Ostrich Farm#5766

Ostrich Farm

1 second
256 megabytes
Easy

Johnny, who works in government services in an undisclosed country, spends his free time raising ostriches on his small farm.

His farm consists of rows and columns of ostriches, with each bird housed in its own pen. Johnny constructed these pens by setting up partitions to form a grid of n \times m square pens, each measuring 1 \times 1. Importantly, he placed exactly one partition between neighboring pens, not two.

One autumn day, an ostrich named Chuck, residing in the bottom-left pen, decided to break free to handle some urgent ostrich business. Chuck began by breaking the partition to his right and moved into the adjacent pen. He then broke the partition above and moved up. Chuck continued this pattern, alternately breaking right and upper partitions, until he finally escaped.

The chaos caused by Chuck left Johnny quite distressed. However, he had no choice but to restore order. He contacted the nearest sawmill to report the number of partitions he had left, but he forgot to mention how many partitions he needed.

Your task is to assist the sawmill workers: given the number of partitions Johnny has left, determine the possible dimensions of the farm.

Input

The input consists of a single integer (1 \le x \le 10^9), representing the number of partitions Johnny has remaining.

Output

First, output the number of possible dimension options for Johnny's farm. Then, for each of the possible options, output two integers on a new line, representing the possible values of and .

Note: It is possible that Johnny miscounted the remaining partitions, resulting in no valid dimension options. In such cases, output the single number .

Examples

Example 1

Loading
Loading