S = input() print(['No', 'Yes'][S.count('9') == len(S)])