PivotOJ

Arithmetic Adaptation

시간 제한: 1000ms메모리 제한: 2048MB출처: NCPC 2025BOJ 35216

문제

Practice does make perfect! You have finally achieved proficiency at the task of adding two small nonzero integers aa and bb to compute their sum a+ba+b. Before you move on to studying four-digit numbers, you want to achieve mastery by also understanding the inverse problem: given integer ss, determine nonzero aa and bb such that a+b=sa+b=s. None of the numbers may use more than 33 digits.

입력

The input consists of:

  • One line with an integer ss such that 999s999-999\leq s\leq 999.

출력

Output two integers aa (with 999a999-999\leq a\leq 999 and a0a\neq 0) and bb (with 999b999-999\leq b\leq 999 and b0b\neq 0) such that a+b=sa+b=s. If there is more than one valid solution, you may output any one of them.

예제

예제 1

입력
10
출력
3 7

예제 2

입력
-1
출력
-2 1

예제 3

입력
3
출력
1 2

예제 4

입력
0
출력
-999 999
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.