let f s =
 let rec fiter s =
  if String.length s=0
   then false
   else
    (if s.[0]=='9'
     then true
     else fiter (String.sub s 1 ((String.length s)-1)));;
let () = Scanf.scanf "%s"
f
|> (fun a -> if a then "Yes" else "No")
|> Printf.printf "%s\n"