N = input() if set(list(N)) == {"9"}: print("Yes") else: print("No")