Steve Jobsoong

No attempts yetTime limit1sMemory limit128 MB

Problem

Steve Jobsoong opens every talk with a math trick to pull the audience in.

His first trick is that the square root of a number is the back half of its digits. (25=5\sqrt{25} = 5, 5776=76\sqrt{5776} = 76)

His second trick is that multiplying a number by X=2.6X = 2.6 gives the number you get by moving its first digit to the last position. (135×2.6=351135 \times 2.6 = 351, 270270×2.6=702702270270 \times 2.6 = 702702)

The audience went wild over the second trick, so Jobsoong wants to know whether some XX other than 2.62.6 has the same property.

Given XX, write a program that finds every number whose product with XX equals the number obtained by moving its first digit to the last position.

Input

The first line contains XX. (1X<10001 \le X < 1000)

XX is given with at most four digits after the decimal point.

Output

Print every natural number smaller than 10810^8 whose product with XX equals the number obtained by moving its first digit to the last position, one per line in increasing order.

If no such number exists, print No solution.