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