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