eolymp
bolt
Try our new interface for solving problems
Problems

Watson`s memory

Watson`s memory

Watson’s memory is in critical state, it means all its cells are filled with ones. Rybka learned that if one considers all the Watson’s memory as one big hexadecimal number, this number would be divisible by \textbf{7}. However, she did not believe this and decided to check it. In order to do this, Rybka asked Watson about a number of cells his memory consists of. It turned out that the memory contains many cells -- Rybka has not seen such a big numbers before. Help Rybka to check divisibility property of Watson’s memory content. \InputFile One non-negative decimal integer -- number of cells in Watson’s memory. This integer has not more than \textbf{100} decimal digits. \OutputFile You need to print checking result as one word (without quotes): "\textbf{yes}" - Watson’s memory is divisible by \textbf{7}, "\textbf{no}" - Watson’s memory is not divisible by \textbf{7}.
Time limit 0.5 seconds
Memory limit 16 MiB
Input example #1
9
Output example #1
yes

Example description: Watson`s memory is hexadecimal 111111111. This equals to decimal 4581298449, which is divisible by 7.