solve []      = "No"
solve (x:xs)
  | x=='9'    = "Yes"
  | otherwise = solve xs

solve2 x = if any (=='9') x then "Yes" else "No"

solve3 []       = "No"
solve3 ('9':xs) = "Yes"
solve3 (x:xs)   = solve3 xs

main = do
  a <- getLine
  putStrLn $ solve3 a