n = int(eval(input()))

a = list(str(n))

s = sum([int(a[i]) for i in range(len(a))])

if n%s==0:

    print('Yes')

else:

    print('No')
n = int(eval(input()))

a = list(str(n))

c = 0

for i in range(len(a)):

    c+=int(a[i])

if n%c==0:

    print('Yes')

else:

    print('No')
n = int(eval(input()))
a = list(str(n))
s = sum([int(a[i]) for i in range(len(a))])
if n % s == 0:
    print("Yes")
else:
    print("No")

n = int(eval(input()))
a = list(str(n))
c = 0
for i in range(len(a)):
    c += int(a[i])
if n % c == 0:
    print("Yes")
else:
    print("No")

-s = sum([int(a[i]) for i in range(len(a))]) -if n % s == 0: +c = 0 +for i in range(len(a)): +    c += int(a[i]) +if n % c == 0: