#R1012. [KBC001D] Sequence 1

[KBC001D] Sequence 1

Problem Statement

Given an integer NN, output all continuous positive integer sequences with a sum of NN and a length greater than or equal 22 in order.

Constraints

  • 1N10161\leq N\leq 10^{16}.
  • NN is a positive integer.

Subscores

  • 100100 points will be awarded for passing the test set satisfying N106N\leq10^6.

Input

Input is given from Standard Input in the following format:

$\color{#cccccc}\boxed{\color{white}{\large{|}}\color{black}N\color{white}{\large{|}}}$

Output

Output a total of tt lines, where tt represents the number of different sequences. Each line outputs two numbers ll and rr (both greater than 00), indicating the starting and ending numbers of the sequence. Note that when there are multiple sequences, they should be outputted in descending order based on ll. If there is no answer, DO NOT output anything.

Sample Input 1

27

Sample Output 1

13 14
8 10
2 7

13+14=8+9+10=2+3++6+7=2713+14=8+9+10=2+3+\cdots+6+7=27.

Sample Input 2

69

Sample Output 2

34 35
22 24
9 14

$\sum_{i=34}^{35}i=\sum_{i=22}^{24}i=\sum_{i=9}^{14}i=69$.