program main
    integer :: n,nn
    integer :: a = 10, i = 0, ans = 0

    read *, n
    nn = n

    do while (n/a > 0)
        i = mod(n,a)
        n = n - i
        a = a * 10
        ans = ans + i
    end do

    if(mod(nn, ans) == 0) then
        print *, "Yes"
    else
        print *, "No"
    end if
end program main