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