407166: GYM102697 137 Cheesy Numbers

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

137. Cheesy Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You consider a number to be cheesy if it is divisible by the sum of its digits. For example, the sum of the digits of 360 is 9, and 360 is divisible by 9, so 360 is a cheesy number. On the other hand, the sum of digits of 87 is 15, and 87 is not divisible by 15, so 87 is not a cheesy number.

Given a number $$$n$$$, figure out whether or not it is a cheesy number.

Input

The only line of input contains a single integer $$$n$$$: the number to test. $$$n$$$ is guaranteed to fit inside of an "int" data type in Java.

Output

If $$$n$$$ is a cheesy number as described above, output "YES" (no quotes). Otherwise, output "NO" (no quotes).

ExamplesInput
360
Output
YES
Input
87
Output
NO
Input
72
Output
YES

加入题单

上一题 下一题 算法标签: