program ds
    implicit none
    integer(4) n
    integer :: i=0,digit=0,tmp=0,sn=0

    read(*,*) n

    do i=0,9
        if(.not. n/(10**i)==0)then
            digit = digit + 1
        else
        endif
    enddo

    do i=0,digit
        tmp = n/(10**(digit-i))
        sn = sn + tmp
        n = n - tmp*10**(digit-i)
        !write(*,*) tmp,sn,n
    enddo
    
    if(modulo(n,sn)==0)then
        write(*,*) 'Yes'
    else
        write(*,*) 'No'
    endif

end program ds 