program main
  implicit none
  integer :: n
  read(*, *) n
  if (mod(n, sn(n)) == 0) then
    write(*, "(a)") "Yes"
  else
    write(*, "(a)") "No"
  end if
  contains

  function sn(n)
    implicit none
    integer, intent(in) :: n
    integer :: sn, i, d
    character(10) :: st
    write(st, "(i10)") n  ! int to string
    sn = 0
    do i = 1, 10
      read(st(i:i), "(i1)") d  ! char to int
      sn = sn + d
    end do
  end function sn
end program main
