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.
s=input()
if int(s)%sum(map(int,list(s)))==0:
	print('YES')
else:
  	print('NO')
    
s=input()
if int(s)%sum(map(int,list(s)))==0:
	print('Yes')
else:
  	print('No')
    