import Control.Applicative ((<$>), (<*>))
import Data.Bool (bool)
import Data.Char (digitToInt)

main :: IO ()
main = solve <$> readLn >>= putStrLn

solve :: Int -> String
solve = bool "No" "Yes" . (== 0) . ((sum . map digitToInt . show) >>= flip mod)
