object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val datX = readLine.split(" ").map(_.toInt).head
    val datFX = datX.toString.split("").filterNot(_ == "").map(_.toInt).sum
    val ans = datX % datFX == 0
    println(if(ans) "Yes" else "No")
  }
}
