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
The input file contains the number K.
Process to the end of file.