407424: GYM102788 B Rectangles
Description
Imagine rectangles drawn on a piece of squared paper, their sides matching the lines of the grid. In such case, the cells within a rectangle are either external if they are adjacent to the sides (marked black in the figure below) or internal if they are not attached to the sides (marked grey in the figure).
Calculate how many rectangles there are with the number of external cells exactly $$$n$$$ times smaller than the number of internal cells. Print the sizes of all appropriate rectangles in the ascending order based on the length of the smaller side.
InputThe input file contains a single positive integer $$$n$$$ ($$$1 \le n \le 10^9$$$).
OutputIn the first output line, print $$$k$$$ — the number of rectangles meeting the above criterion. The next $$$k$$$ lines must contain pairs of numbers representing the sides of appropriate rectangles (first the smaller side then the biggest one) in the ascending order based on the length of the smaller side.
ExamplesInput1Output
2 5 12 6 8Input
2Output
4 7 30 8 18 9 14 10 12