e-olymp
Competitions

Робота з рядками

Divide on three!

Two friends came to Vasyl with great news: they won in lottery n rubles. Since the lottery ticket was obtained as a short change during the overall purchase in the store, it was impossible to determine its owner. So it was decided to split the prize equally. Vasil wants to know whether its possible to divide the prize fairly.

Input

One positive integer n of no more than 255 digits.

Output

Print "YES" if the given number is divisible by 3, and "NO" otherwise.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1234567890987654321
Output example #1
YES
Input example #2
25
Output example #2
NO