An integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X when written in base 10.  Given an integer N, determine whether it is a Harshad number.
x = int(input())
fx = 0
tmp = x
while tmp > 0:
  fx += tmp - tmp // 10 * 10
  tmp = tmp // 10
print("yes" if x % fx == 0 else "no")
x = int(input())
fx = 0
tmp = x
while tmp > 0:
  fx += tmp - tmp // 10 * 10
  tmp = tmp // 10
print("Yes" if x % fx == 0 else "No")