import Control.Applicative

getInt :: IO Int
getInt = (\a -> read a :: Int) <$> getLine

getInteger :: IO Integer
getInteger = (\a -> read a :: Integer) <$> getLine

{-
ListInt :: IO [Int]
ListInt = (map (\a -> read a :: Int) $ words) <$> getLine

ListInteger :: IO [Integer]
ListInteger = (map (\a -> read a :: Integer) $ words) <$> getLine
-}

sumInt 0 =  0
sumInt n = (mod n 10) + (sumInt $ div n 10)

cond :: Integer -> String
cond n =
    let a = sumInt n
        in if 0 == mod n a then "Yes" else "No"

main = do
    putStrLn =<< cond <$> getInteger
