Problem1691--Sum of continuous natural Numbers

1691: Sum of continuous natural Numbers

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

For a given natural number M, find all continuous natural number segments (continuous number is greater than 1), the sum of all the continuous natural number segments is M.


Example: 1998+1999+2000+2001+2002 =10000, so a natural number segment from 1998 to 2002 is a solution to M=10000.

Input

A single line containing an integer gives the value of M (10 <= M <= 2,000,000)

Output

Each line has two natural Numbers. The first and last Numbers in a continuous natural number segment satisfying the condition are given. The two Numbers are separated by a space.

Sample Input Copy

10000

Sample Output Copy

18 142 
297 328 
388 412 
1998 2002

HINT

Simple arithmetic

Source/Category