import scala.io.StdIn

object Main extends App {

  def dec(n: String) = n.foldLeft(0)((acc, c) => acc + Integer.parseInt(c.toString))

  val n = StdIn.readLine()

  val x = dec(n)

  // 10000000000
  println(if (x != 0 && n.toLong % x == 0) "Yes" else "No")

}
