Starting from n, repeatedly replace it with the sum of the squares of its digits. A number is happy if this process eventually reaches 1; otherwise it falls into a cycle that never includes 1.
Input format
One line: a positive integer n.
Output format
Print YES if n is happy, otherwise NO.
Constraints
- 1 <= n <= 1000000000