program main
implicit none
integer :: i, j, n, s, ni

read(*,*) n
do i = 1, 9
   if ( 10**i .le. n .and. 10**(i+1) .gt. n ) then
       ni = i+1
   end if
end do

s = 0
do i = 1, ni
   j = ni - i
   s = s + n/(10**j)
   n = n - 10**j * ( n/(10**j) )
end do
if (mod(n,s) == 0 ) then
   write(*,'(a4)') 'Yes'
else
   write(*,'(a3)') 'No'
end if

end program main
