提示: 欢迎访问OurACM平台。因与高数考试冲突,校赛改为5月6日13:00-17:00
Problem 1017 Playing with Calculator

Accept: 255    Submit: 734
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

Pete is playing a game. He types on a calculator a natural number K and then presses the '+' key. The display still shows K. Pete wants to have on the display a number that is formed using only one figure. In order to get that he presses, if it is necessary, the '=' key several times (maybe 0). The result after the first pressing is K+K. After each pressing the number K is added to the sum. Find out whether Pete will achieve his goal or not, and what number, consisting all of identical figures, he will get first. Consider the capacity of the calculator to be unlimited.

K < 1000


Input

The input file contains the number K.

Process to the end of file.


Output

The output file must contain two numbers: first the figure that forms the result and then the number of digits of the result. If multiple solution exists, first minimize the figure then minimize the number of digits. If finding the desired result is impossible, the output file must contain only one number -1 (minus 1). The numbers in the output file must be separated by one space.


Sample Input

37

Sample Output

1 3

Submit  Back  Status  Discuss