SP3005 LAND - Subdividing a Land
Description
Indigo Real-estate Company is now planning to develop a new housing complex. The entire complex is a square, all of whose edges are equally _a_ meters. The complex contains _n_ subdivided blocks, each of which is a _b_-meter square. Here both _a_ and _b_ are positive integers.
However the project is facing a big problem. In this country, a percentage limit applies to the subdivision of a land, under the pretext of environmental protection. When developing a complex, the total area of the subdivided blocks must not exceed 50% of the area of the complex; in other words, more than or equal to 50% of the newly developed housing complex must be kept for green space. As a business, a green space exceeding 50% of the total area is a _dead space_. The primary concern of the project is to minimize it.
Of course purchasing and developing a land costs in proportion to its area, so the company also wants to minimize the land area to develop as the secondary concern. You, a member of the project, were assigned this task, but can no longer stand struggling against the problem with your pencil and paper. So you decided to write a program to find the pair of minimum _a_ and _b_ among those which produce the minimum dead space for given _n_.
Input Format
The input consists of multiple test cases. Each test case comes in a line, which contains an integer _n_. You may assume 1 ≤ _n_ ≤ 10000.
The end of input is indicated by a line containing a single zero. This line is not a part of the input and should not be processed.
Output Format
For each test case, output the case number starting from 1 and the pair of minimum _a_ and _b_ as in the sample output.
You may assume both _a_ and _b_ fit into 64-bit signed integers.