import Data.Char

main = do
  xs <- getLine
  putStrLn $ solve xs


solve :: String -> String
solve x
  | y `mod` dd == 0 = "Yes"
  | otherwise = "No"
  where
    dd = foldr(+) 0 $ map digitToInt x
    y = read x :: Int
