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