program test
implicit none

integer :: i,j,k,l,m,n,sn,nn

read(*,*) n

sn = 0
nn = n
do 
sn = sn + mod(nn,10)
if(nn <= 9) then
goto 100
else
nn = nn / 10
endif
enddo
100 continue

if(mod(n,sn) == 0)then
write(*,*) 'Yes'
else
write(*,*) 'No'
endif

end program