100 atcoder#ABC101B. [ABC101B] Digit Sums

[ABC101B] Digit Sums

Score : 200200 points

Problem Statement

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

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

Constraints

  • 1N1091 \leq N \leq 10^9

Input

Input is given from Standard Input in the following format:

NN

Output

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

12
Yes

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

101
No

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

999999999
Yes