n = input() if n == '9' * len(n): print("Yes") else: print("No")