{-# LANGUAGE ScopedTypeVariables, LambdaCase #-}

import qualified Data.List as List
import qualified Data.Set as Set

main :: IO ()
main = do
    s <-  getContents
    putStrLn $ if '9' `elem` s then "Yes" else "No"