The Luckiest number#1158

The Luckiest number

1 second
64 megabytes
Hard

Chinese people consider the digit "8" to be lucky. Bob also likes the digit "8". Furthermore, Bob has his own lucky number . Now he wants to construct his luckiest number, defined as the smallest positive integer consisting only of digit "8", and which is a multiple of .

Input

The input consists of multiple test cases. Each test case is given on a separate line and contains a single integer (1 \leq L \leq 2000000000).

The last test case is followed by a line containing a zero.

Output

For each test case, print a line containing the test case number (beginning with 1), followed by the length of Bob's luckiest number. If Bob cannot construct such a number, print zero.

Examples

Example 1

Loading
Loading