N = input() if all(c == '9' for c in N): print('Yes') else: print('No')