import Control.Applicative
import Control.Monad

solve :: String -> String
solve xs
    | length (filter ((==) '9') xs ) > 0 = "Yes"
    | otherwise                          = "No"

main :: IO ()
main = do
    n <- getLine
    putStrLn $ solve n
