import qualified Data.ByteString.Char8 as B
import Data.Maybe

main = do
  n <- fst . fromJust . B.readInteger <$> B.getLine
  if (solve n n 0) then (putStrLn "Yes") else (putStrLn "No")

solve :: Integer -> Integer -> Integer -> Bool
solve orig n sn
  | n == 0 = (orig `mod` sn) == 0
  | otherwise = solve orig (n `div` 10) (sn + (n `mod` 10))