#d2676. 整除光棍

整除光棍

Divisible Repunit

Problem Description

Here the so-called "lonely number" does not refer to a single person~ it refers to a number consisting entirely of 11s, such as 1,111,11111, 111, 1111, etc. Legend has it that any lonely number can be divided by an odd number that does not end with 55. For example, 111111111111 can be divided by 1313. Now your program should read an integer xx, which is definitely an odd number and does not end with 55. Then, after calculation, output two numbers: the first number ss, meaning that xx multiplied by ss is a lonely number, and the second number nn is the number of digits of this lonely number. Such a solution is of course not unique; you are asked to output the smallest solution.

Hint: an obvious method is to gradually increase the number of digits of the lonely number until it is divisible by xx. But the difficulty is that ss may be a very large number — for example, if the program inputs 3131, it should output 35842293906813584229390681 and 1515, because 3131 multiplied by 35842293906813584229390681 equals 111111111111111111111111111111, which has 1515 ones in total.

Input Format

A single line containing a positive odd number xx that does not end with 55 (x<1000x < 1000).

Output Format

Output the corresponding smallest ss and nn in one line, separated by a single space.

Sample Input

31

Sample Output

3584229390681 15