시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 2 1 1 50.000%

문제

Using a pocket calculator, enter a positive integer K and press "+". The calculator still shows the number K. Then again enter the number K. After pressing the "+" key for the second time, the result is: K + K. The game goal is to obtain a number, consisting of equal digits only, by repeating this operation many (possibly 0) times. Write a program calcgame that determines whether it is possible to reach the goal.

If possible, what is the first number, which consists of equal digits only and is obtained by multiple summing?

입력

On the standard input, a positive integer K is given. (1 ≤ K ≤ 999)

출력

If reaching the goal is impossible, print "Impossible". If possible, a line of the standard output should contain two integers separated by a space: the first is the digit itself and the secong is the amount of digits of the obtained number.

예제 입력

37

예제 출력

1 3

예제 입력 2

25

예제 출력 2

Impossible

예제 입력 3

999

예제 출력 3

9 3

힌트