n = int(eval(input()))

i = n

m = 0

while i > 0:

    m += i % 10

    i = i // 10



if n % m != 0:

    print('No')

else:

    print('Yes')
n = eval(input())

m = list(n)

m = list(map(int,m))

m = sum(m)

if int(n) % m == 0:

    print('Yes')

else:

    print('No')
n = int(eval(input()))
i = n
m = 0
while i > 0:
    m += i % 10
    i = i // 10
if n % m != 0:
    print("No")
else:
    print("Yes")

n = eval(input())
m = list(n)
m = list(map(int, m))
m = sum(m)
if int(n) % m == 0:
    print("Yes")
else:
    print("No")

-n = int(eval(input())) -i = n -m = 0 -while i > 0: -    m += i % 10 -    i = i // 10 -if n % m != 0: +n = eval(input()) +m = list(n) +m = list(map(int, m)) +m = sum(m) +if int(n) % m == 0: +    print("Yes") +else: -else: -    print("Yes")