N = int(eval(input()))



S = str(N)

total = 0

for s in S:

    total += int(s)



print(("Yes" if N%total==0 else "No"))
N = int(eval(input()))



S,N2 = 0,N

while N2 >= 1:

    S += N2%10

    N2 //= 10



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

N = int(eval(input()))
S, N2 = 0, N
while N2 >= 1:
    S += N2 % 10
    N2 //= 10
print(("Yes" if N % S == 0 else "No"))

-S = str(N) -total = 0 -for s in S: -    total += int(s) -print(("Yes" if N % total == 0 else "No")) +S, N2 = 0, N +while N2 >= 1: +    S += N2 % 10 +    N2 //= 10 +print(("Yes" if N % S == 0 else "No"))