n=set(list(input())) if len(n)==1 and "9" in n: print("Yes") else: print("No")