#R1012. [KBC001D] Sequence 1
[KBC001D] Sequence 1
Problem Statement
Given an integer , output all continuous positive integer sequences with a sum of and a length greater than or equal in order.
Constraints
- .
- is a positive integer.
Subscores
- points will be awarded for passing the test set satisfying .
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 lines, where represents the number of different sequences. Each line outputs two numbers and (both greater than ), 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 . If there is no answer, DO NOT output anything.
Sample Input 1
27
Sample Output 1
13 14
8 10
2 7
.
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$.