Problem10470--ABC101 —— B - Digit Sums

10470: ABC101 —— B - Digit Sums

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

Let $S(n)$ denote the sum of the digits in the decimal notation of $n$. For example, $S(101) = 1 + 0 + 1 = 2$.

Given an integer $N$, determine if $S(N)$ divides $N$.

Input

Input is given from Standard Input in the following format:

```
$N$
```

Output

If $S(N)$ divides $N$, print `Yes`; if it does not, print `No`.

Constraints

-   $1 \leq N \leq 10^9$

Sample 1 Input

12

Sample 1 Output

Yes
In this input, N=12. As S(12)=1+2=3, S(N) divides N.

Sample 2 Input

101

Sample 2 Output

No
As S(101)=1+0+1=2, S(N) does not divide N.

Sample 3 Input

999999999

Sample 3 Output

Yes

Source/Category