P9407 [POI 2020/2021 R3] Prime Sum / Suma liczb pierwszych
Background
Translated from [XXVIII Olimpiada Informatyczna - Stage III](https://sio2.mimuw.edu.pl/c/oi28-3/dashboard/) [Suma liczb pierwszych](https://szkopul.edu.pl/problemset/problem/8brtPux-IyytS6rOoOR1cJTL/statement/).
d2t3。
Description
You are given a number $n$. Find $l, r$ such that the sum of all prime numbers in the interval $[l, r]$ equals $n$.
If there are multiple solutions, any one is acceptable. If there is no solution, output `NIE`.
Input Format
One line containing one positive integer $n$.
Output Format
If there is a solution, output one line with two positive integers $l, r$, your answer.
If there is no solution, output `NIE`.
Explanation/Hint
For all testdata, $1\leq n\leq 10^{11}$.
# Constraints
| Subtask ID | Additional Constraints | Score |
| :----------: | :----------: | :----------: |
| 1 | $n\leq 10000$ | 15 |
| 2 | $n\leq 10^8$ | 20 |
| 3 | $n\leq 2\times 10^9$ | 40 |
| 4 | | 25 |
Translated by ChatGPT 5