def getpro(n):
    sum=1
    while(n!=0):
        sum = sum * int(n % 10) 
        n = int(n/10) 
    return sum
def getSum(n): 
    sum = 0
    while (n != 0): 
        sum = sum + int(n % 10) 
        n = int(n/10) 
    return sum
n = int(input())
a=getSum(n)
b=getpro(n)
if(a+b==n):
    print("YES")
else:
    print("NO")
