l = list(input()) if l.count('9') == len(l): print('Yes') else: print('No')