import java.util.Scanner

object Main{
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)

    val N = sc.nextLong()
    var num = 0 :Double

    var n = N

    for (i <- 9 to 0 by -1) {
      val tmp = Math.pow(10, i).toLong
      if (n / tmp >= 1) {
        num += n / tmp
      }
      n = n % tmp
    }

    val po = num.toInt

    println(po)

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