eolymp
bolt
Try our new interface for solving problems
Problems

Polar ones

Polar ones

A programmer at the North Pole was working at a computer, wearing gloves and could therefore type only $0$ and $1$, Key $0$ got clogged. Will the programmer be able to type a minimum number, consisting of only ones and at the same time a multiple of the given number $n$? \InputFile One number $n~(n \le 1000)$. \OutputFile Print the desired number or "\textbf{no}" if such number does not exist.
Time limit 1 second
Memory limit 122.17 MiB
Input example #1
100
Output example #1
no
Input example #2
57
Output example #2
111111111111111111
Source SCS 2009