Consecutive Sums

Print every run of two or more consecutive positive integers that sums to N, ordered by starting value.

Medium4MathNumber theoryInterviewNo attempts yetTime limit1sMemory limit64 MB

Problem

Find every way to write a positive integer NN as a sum of two or more consecutive positive integers.

For example, N=9N = 9 has two such sums: 9=2+3+49 = 2 + 3 + 4 and 9=4+59 = 4 + 5.

Input

The first line contains the positive integer NN (3N10103 \le N \le 10^{10}).

Output

For each run of consecutive positive integers whose sum is NN, print the first addend and the last addend on one line, separated by a space.

Print the runs in increasing order of the first addend. Every NN given in the input has at least one such run.

Hint

The sum of kk terms starting at aa equals ka+k(k1)2ka + \frac{k(k-1)}{2}.