n = int(eval(input()))

s = str(n)

sum = 0

for i in range(len(s)):

    sum+=(ord(s[i])-ord('0'))

if n%sum == 0:

    print("Yes")

else:

    print("No")
s = eval(input())

sum = 0

for i in s:

    sum+=int(i)

if int(s)%sum == 0: print("Yes")

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

s = eval(input())
sum = 0
for i in s:
    sum += int(i)
if int(s) % sum == 0:
    print("Yes")
else:
    print("No")

-n = int(eval(input())) -s = str(n) +s = eval(input()) -for i in range(len(s)): -    sum += ord(s[i]) - ord("0") -if n % sum == 0: +for i in s: +    sum += int(i) +if int(s) % sum == 0: