main :: IO()
main = do
    a <- readLn
    putStrLn $ if (getsolve a) then "Yes" else "No"
    
getsolve :: Int -> Bool
getsolve num
    | num == 0			= False
    | mod num 10 ==9	= True
    | otherwise			= getsolve $ div num 10
