N = input() s = "9" for i in range(105): if s == N: print("Yes") exit() s += "9" print("No")