program ABC_080_B_HarshadNumber
   implicit none
   integer i, N, Nold, fN
   read(*, *) N
   fN = 0
   Nold = N
   do i = 1, 9
       fN = fN + mod(N, 10) 
	   N = N / 10
   end do
   if(mod(Nold, fN) == 0) then
       write(*, *) 'Yes'
   else
       write(*, *) 'No'
   end if
end program ABC_080_B_HarshadNumber