N=input() if N.count("9")==len(N): print("Yes") else: print("No")