logo AlgoBeat OnlineJudge
登录 注册

#214632. [NCPC 2025] Arithmetic Adaptation

内存限制:1024 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

:::align{center}

Postcard showing a Norwegian by solving Sample 3. Coloured black and white photo, National Library of Norway. :::


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

输入格式

The input consists of:

  • One line with an integer such that .

输出格式

Output two integers (with and ) and (with and ) such that . If there is more than one valid solution, you may output any one of them.

样例

样例输入 1

10

样例输出 1

3 7

样例输入 2

-1

样例输出 2

-2 1

样例输入 3

3

样例输出 3

1 2

样例输入 4

0

样例输出 4

-999 999

数据范围与提示

Explanation of Sample Input 1

On input , the output is correct because . Note that many other outputs would also be correct, such as , , or even . On the other hand, the answer would be (because ), and so would (because both and must be nonzero) and (because both and must have at most three digits.)