#arc144a. [arc144_a]Digit Sum of 2x
[arc144_a]Digit Sum of 2x
Problem Statement
For a positive integer , let be the sum of its digit. For example, and .
You are given a positive integer . Find the following positive integers and :
- The maximum positive integer for which there exists a positive integer such that and .
- The minimum positive integer such that and for the above.
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print in the first line and in the second line.
Sample Input 1
3
Sample Output 1
6
3
We can prove that whenever , . Thus, . The minimum positive integer such that and is . These and should be printed.
Sample Input 2
6
Sample Output 2
12
24
Sample Input 3
100
Sample Output 3
200
4444444444444444444444444