program name
    implicit none
    integer(4):: n,ni,dsum

    read*, n
    dsum=0
    ni=n
    do while(ni>0)
        dsum=dsum+mod(ni,10)
        ni=ni/10
    end do

    if (mod(n,dsum)==0) then
        print*, 'Yes'
    else
        print*, 'No'
    end if
    
end program name