s=input() S=set([str(c) for c in s]) if S==set("9"): print("Yes") else: print("No")