program digit_sums
  implicit none
  integer :: n, m, s = 0
  read(*,*) n
  m = n
  do while (m > 0)
    s = s+mod(m,10)
    m = m/10
  end do
  write(*,'(a)') trim(merge("Yes","No ",mod(n,s) == 0))
end program digit_sums