N = input() length = len(N) list_9 =["9"]*length T = "" for i in list_9: T += i if N == T: print("Yes") else: print("No")