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