

main :: IO()
main = do
    n <- getLine
    let s = read n :: Int
    putStrLn $ toResult $ hasNine s

hasNine :: Int -> Bool
hasNine n 
    | (div n 10) == 9 || (mod n 10) == 9 = True
    | otherwise = False

toResult :: Bool -> String
toResult True = "Yes"
toResult False = "No"