fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    val total = f(n)
    println(if ((n % total) == 0) "Yes" else "No")
}

private fun f(n: Int): Int {
    var sum = 0
    var value = n
    while (value >= 1) {
        sum += (value % 10)
        value /= 10
    }
    return sum
}