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