import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  n <- (read::String -> Int) <$> getLine
  let digitSum = calc n
  putStrLn $ if n `mod` digitSum == 0 then "Yes" else "No"

calc::Int -> Int
calc n = if n == 0 then 0 else (n `mod` 10) + calc (n `div` 10)
