def Main(): n=input() if n.count("9")==len(n): print("Yes") else: print("No") Main()