module Main where
main = interact $ printer . solver . parser
int = read :: String -> Int

printer = unlines . (:[])
parser = int

solver n = if (n `div` 10) == 9 || (n `mod` 10) == 9 then "Yes" else "No"