import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    s <- getLine
    let a = sum $ map read s
    -- 出力
    putStrLn $ if (a `div` 10) == 0 then "Yes" else "No"
