You had two identical rectangular monitors, each of which measured d inches diagonally. When you placed them side by side you could create a larger monitor that measured k.d (k multiplied by d) inches diagonally. You should assume that monitors had zero bezels (frame around the screen has width zero) and had no gaps in between when placed side by side. As many years have passed so now you cannot remember the size of the monitors but only remember the value of k. From this value of k, you will have to find the aspect ratio (Ratio of width and height of a monitor) of any one of the monitors (Both will obviously have the same aspect ratio).
Input
First line of the input file contains a positive integer T (T ≤ 100000) which denotes the number of test cases to follow. Each of the next T lines contains a floating point number which denotes a possible value of k. This floating-point number has 10 digits after the decimal point. The value of k will be within the range: 1.015 to 1.993
Output
For each test case output, print the case number and the possible aspect ratio of the monitor. If the aspect ratio of the monitor is 16.5:9.5, you should output $\frac{16.5}{9.5} = 1.7368$. So the output should be rounded to 4 digits after the decimal point. You can assume that for the given inputs there will always be an unique aspect ratio. You can also assume that the inputs will be such that for small precision errors the printed output will not differ.
Sample
Sample Input | Sample Output |
---|---|
1 1.2500000000 | Case 1: 0.4804 |