Problem A
Press-ups
Languages
en
is

Hrefna started a strict exercise regiment some time ago to try to improve how many push-ups she can do. Every day she does one more push-up than the day before, no matter what it takes.
You see that this has netted good results for her and are considering whether it would be a good idea to try this. But you realise you do not know how many push-ups she did the first day. When asked she says she does not remember how many push-ups she started with or for how many days she has been doing the regiment. But she has been meticulously counting the push-ups she does, so she can tell you she has done $n$ push-ups in total.
Input
The input contains a single positive integer $n$, the total number of push-ups Hrefna has done.
Output
For each possible number of push-ups Hrefna could have started with on the first day, print one line. That line should contain two integers $f$ and $d$ separated by a space. This means that Hrefna would have finished $n$ push-ups if she did $f$ push-ups on the first day and has been doing the regiment for $d$ days in total. $f, d \geq 1$ should always hold.
Print the lines in ascending order by $f$.
Hrefna never makes mistakes when it comes to something as important as counting push-ups, so you may assume that there is at least one line in the output.
Scoring
Group |
Score |
Constraints |
1 |
20 |
$n \leq 20$ |
2 |
20 |
$n \leq 1\, 000$ |
3 |
20 |
$n \leq 1\, 000\, 000$ |
4 |
20 |
$n \leq 10^{12}$ |
5 |
20 |
$n \leq 10^{18}$ |
Sample Input 1 | Sample Output 1 |
---|---|
120 |
1 15 22 5 39 3 120 1 |
Sample Input 2 | Sample Output 2 |
---|---|
32 |
32 1 |