"Sum"
Very easy
Execution time limit is 0.5 seconds
Runtime memory usage limit is 256 megabytes
It is well known that Mark likes creating mathematical tasks very much. Recently he has invented the following one: for given S find all positive integers А and В, that А ≤ В and
А + (А + 1) + (А + 2) + … + (В - 1) + В = S.
Input
Input contains one integer S (1 ≤ S ≤ 10^12).
Output
First line at output should contain one integer K – number of pairs that have been found. Each of following K lines should contain 2 integers, first not greater than second – corresponding pair. Pairs should be printed sorted ascending by first number.
Examples
Input #1
Answer #1
Submissions 305
Acceptance rate 29%