N = int(input()) check_str = '9' * len(str(N)) if check_str == str(N): ans = 'Yes' else: ans = 'No' print(ans)