There are n points in 3D space. You're to find a smallest enclosing box of these points. By "smallest" we mean volume. Note that the sides of the box might not be parallel to the coordinate axes.
There will be at most 10 test cases in the input. Each test case begins with a single integer n (4 <= n <= 10), the number of points. Each of the following n lines contains three integers x, y, z (-100 <= x,y,z <= 100), the coordinates of the points. The points will not be coplanar. The last test case is followed by a line with n=0, which should not be processed.
For each line, print the volume of the smallest enclosing box, rounded to two decimal places.
9 0 0 0 0 2 0 2 0 0 2 2 0 0 0 2 0 2 2 2 0 2 2 2 2 1 1 1 4 0 0 0 1 1 0 1 0 1 0 1 1 5 0 0 0 3 0 1 2 4 3 0 5 7 3 4 9 5 3 2 0 8 9 0 0 9 7 1 9 0 8 6 6 0
8.00 1.00 71.09 385.48
In the fourth example, the vertices of the minimal bounding box are:
(9.33269, 4.89595, 7.61936), (2.62752, 2.26606, 7.37561) (9.70517, 4.62989, 0.243756), (3, 2, 0) (6.70509, 11.6301, 7.24374), (0, 9, 7) (7.07757, 11.3641, -0.131862), (0.372395, 8.73416, -0.375618)