object Main extends App {
	val N = scala.io.StdIn.readLong

	def f(x: Long): Long = {
		var temp = x
		var result = 0L

		while(temp/10L != 0){
			result = result + temp%10L
			temp = temp / 10L
		}
		result = result + temp

		result
	}

	if(N % f(N) == 0) println("Yes")
	else println("No")
}