import java.util
import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val f = (x: Int) => {
      var y = x
      var ret = 0
      while(y!=0) {
        ret += y % 10
        y /= 10
      }
      ret
    }
    println(if(n%f(n)==0) {
      "Yes"
    } else {
      "No"
    })
  }
}
