N = eval(input())

sumN = sum([int(n) for n in N])



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

N = eval(input())

print(("Yes" if int(N) % sum([int(n) for n in N]) == 0 else "No"))

N = eval(input())
sumN = sum([int(n) for n in N])
print(("Yes" if int(N) % sumN == 0 else "No"))

N = eval(input())
print(("Yes" if int(N) % sum([int(n) for n in N]) == 0 else "No"))

-sumN = sum([int(n) for n in N]) -print(("Yes" if int(N) % sumN == 0 else "No")) +print(("Yes" if int(N) % sum([int(n) for n in N]) == 0 else "No"))