-- modules to import --

import Data.ByteString.Char8
import Data.Maybe
import Prelude

-- functions for this task --

read_Integer = fst . fromJust . Data.ByteString.Char8.readInteger
get_Integer  = read_Integer <$> Data.ByteString.Char8.getLine

calculate_digit_sum :: Integer -> Integer
calculate_digit_sum target
        | target >= 10 = val_mod + (calculate_digit_sum $ val_div)
        | target >=  0 = target
        where
                (val_div, val_mod) = divMod target 10

task_B :: Integer -> Bool
task_B target
        | mod target (calculate_digit_sum target) == 0 = True
        | otherwise                                    = False

-- main process is below --

main :: IO ()
main = do

        -- STEP.01
        -- read out the given integer
        integer_given <- get_Integer

        -- STEP.02
        -- output the answer of this task
        Prelude.putStrLn $ if (task_B $ integer_given) then "Yes" else "No"

-- End of this source code --