object Main {
  def main(args: Array[String]): Unit = {
    val num = scala.io.StdIn.readInt
    if( isHarshadNumber( num ) ) println( "Yes" )
    else                         println( "No" )
  }

  def isHarshadNumber( input: Int ): Boolean = {
    var num = input
    var sum = 0
    while( num > 0 ) {
      sum += num%10
      num /= 10
    }

    if( input%sum == 0 ) return true
    else                 return false
  }
}