# B

n = int(eval(input()))



def SumDegit(x):

    ans = 0

    while x > 0:

        ans += x%10

        x = x //10

    return ans

        

if n%SumDegit(n) == 0:

    print('Yes')

else:

    print('No')
# ABC 080 B - Harshad Number

n = int(eval(input()))



def harshad(x):

    tot = 0

    X = x

    while x > 0:

        tot += x%10

        x = x // 10

    if (X / tot)%1 == 0:

        return 'Yes'

    else:

        return 'No'

print((harshad(n)))
# B
n = int(eval(input()))


def SumDegit(x):
    ans = 0
    while x > 0:
        ans += x % 10
        x = x // 10
    return ans


if n % SumDegit(n) == 0:
    print("Yes")
else:
    print("No")

# ABC 080 B - Harshad Number
n = int(eval(input()))


def harshad(x):
    tot = 0
    X = x
    while x > 0:
        tot += x % 10
        x = x // 10
    if (X / tot) % 1 == 0:
        return "Yes"
    else:
        return "No"


print((harshad(n)))

-# B +# ABC 080 B - Harshad Number -def SumDegit(x): -    ans = 0 +def harshad(x): +    tot = 0 +    X = x -        ans += x % 10 +        tot += x % 10 -    return ans +    if (X / tot) % 1 == 0: +        return "Yes" +    else: +        return "No" -if n % SumDegit(n) == 0: -    print("Yes") -else: -    print("No") +print((harshad(n)))