module Main where

import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    n <- getLine
    case find (== '9') n of
        Nothing -> putStrLn "No"
        _       -> putStrLn "Yes"