module Main where

import Control.Applicative
import Control.Monad
import Data.List (unfoldr)

dsum :: Int -> Int
dsum n = sum $ unfoldr f n
  where
    f 0 = Nothing
    f x = let (q, r) = x `divMod` 10 in Just (r, q)

main :: IO ()
main = do
    n <- readLn :: IO Int
    if n `mod` (dsum n) == 0
        then putStrLn "Yes"
        else putStrLn "No"