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