n = input() if all(s == "9" for s in n): print("Yes") else: print("No")