A = set(input()) if len(A) == 1 and A.pop() == "9": print("Yes") else: print("No")