n = input() c = 0 for x in n: if x == "9": c += 1 if c == len(n): print("Yes") else: print("No")