Calculator Game

Time limit1sMemory limit128 MB

Problem

On a pocket calculator, type a positive integer K and press "+"; the display still shows K. Type K again and press "+" once more, and the display shows K + K. Repeating this "type K, press +" action many times (possibly 0 times) makes the multiples of K appear in order: K, 2K, 3K, ...

The goal of the game is to produce a number made up of identical digits only (for example 1, 22, 333, 4444) by repeating this action. Determine whether such a number can be produced, and if so, find the first (smallest) such number obtainable this way.

Input

The first line contains a positive integer K. (1 ≤ K ≤ 999)

Output

If the goal cannot be reached, print "Impossible". Otherwise print two integers separated by a space on one line: the first is the repeated digit of the obtained number, and the second is the number of digits it has.