N = eval(input())

S = 0

for n in N:

  S += int(n)

N = int(N)

print(("Yes" if N%S == 0 else "No"))

n = eval(input())

N = int(n)

n = list(n)

for i in range(len(n)):

    n[i] = int(n[i])

sum_n = sum(n)

if N%sum_n==0:

    print("Yes")

else:

    print("No")

N = eval(input())
S = 0
for n in N:
    S += int(n)
N = int(N)
print(("Yes" if N % S == 0 else "No"))

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

-N = eval(input()) -S = 0 -for n in N: -    S += int(n) -N = int(N) -print(("Yes" if N % S == 0 else "No")) +n = eval(input()) +N = int(n) +n = list(n) +for i in range(len(n)): +    n[i] = int(n[i]) +sum_n = sum(n) +if N % sum_n == 0: +    print("Yes") +else: +    print("No")