  fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    var sum = 0
    var n = N
    while(true) {
      sum += n%10
      n /= 10
      if(n == 0){
        break
      }
    }
    if(N%sum != 0) {
      println("No")
    } else {
      println("Yes")
    }
}