import java.util.Scanner

fun main(args: Array<String>) {
  val cin = Scanner(System.`in`)
  val n = cin.nextInt()

  var sn: Int = 0

  var t = n;
  while (t > 0) {
    sn += t % 10
    t /= 10
  }

  if (n % sn == 0) {
    println("Yes")
  } else {
    println("No")
  }
  println()
  cin.close()
}