A travelling circus faces a tough challenge in designing the dome for its performances. The circus has a number of shows that happen above the stage in the air under the dome. Various rigs, supports, and anchors must be installed over the stage, but under the dome. The dome itself must rise above the center of the stage and has a conical shape. The space under the dome must be air-conditioned, so the goal is to design the dome that contains minimal volume.
You are given a set of points in the space; for are the coordinates of the points in the air above the stage that must be covered by the dome. The ground is denoted by the plane , with positive coordinates going up. The center of the stage is on the ground at the point .
The tip of the dome must be located at some point with coordinates with . The dome must have a conical shape that touches the ground at the circle with the center in the point and with the radius of . The dome must contain or touch all the given points. The dome must have the minimal volume, given the above constraints.
Input Specification
The first line of the input contains a single integer number - the number of points under the dome. The following lines describe points with three floating point numbers , , and per line - the coordinates of -th point. All coordinates do not exceed 1000 by their absolute value and have at most digits after decimal point. All are positive. There is at least one point with non-zero or .
Output Specification
Write to the output a single line with two floating point numbers and - the height and the base radius of the dome. The numbers must be precise up to digits after decimal point.
Sample Input 1
1
1.00 0.00 1.00
Sample Output 1
3.000 1.500
Sample Input 2
2
1.00 0.00 1.00
0.00 1.50 0.50
Sample Output 2
2.000 2.000
Sample Input 3
3
1.00 0.00 1.00
0.00 1.50 0.50
-0.50 -0.50 1.00
Sample Output 3
2.000 2.000
Comments