import scala.io.{StdIn => in}

object Main extends App {
  val n = in.readInt

  def rec(acc:Int, num:Int):Int = {
    if(num == 0) acc
    else rec(acc+num%10, num/10)
  }

  val ans = if(n % rec(0,n) == 0) "Yes" else "No"
  println(ans)
}