Milk and Mocha want to move to a new house in Coffeeland. They don’t like ugly corners sticking into their house, so they want the shape of the house to be a convex polygon with a positive area. Mocha has already shortlisted distinct points where the pillars of the house can be placed at. They just need to choose a few of them and build walls around them.
The transactions in Coffeeland happen with coffee beans. Mocha has already contacted a construction company to build the walls for them. The company doesn’t charge for the pillars. To build a wall between two pillars, the company charges the number of coffee beans equal to the squared Euclidean distance between the pillars. The cost to build a house would therefore be the sum of the costs to build each such wall.
Milk and Mocha like open spaces. However, financially they’re very aware. They’d like to get the best out of their investment. That’s why, they’d choose a house that maximizes the area per every coffee bean they’d be investing. Can you find the maximum possible value for them? You need to do it for construction sites that they have in mind.
The first line contains , the number of independent construction sites Milk and Mocha have in mind. Then the descriptions of these cases follow.
The first line of each case contains the integer , the number of points where pillars can be placed. This number satisfies .
The next lines contain two space-separated integers and each, denoting the coordinates of the chosen points. These numbers satisfy . No three of these points are collinear.
The total number of points over all these cases does not exceed .
For each case, print a single real number — the maximum possible value of area per coffee bean they can get if they choose their house wisely.
Your answer would be considered correct if the absolute difference to the actual answer is within .
2 4 1 2 2 1 2 2 -1 -1 4 0 0 5 0 0 5 5 5
The points in the first sample case represent the points respectively in the following image.
One can check that it’s the most profitable to build a house around the triangle , giving us the value of for area per coffee bean. Here they get an area of for coffee beans.
In particular, choosing to build a house around all the points (i.e. choosing ) brings them a bigger area, but also costs a lot more, leading to a smaller value of area per coffee bean.
The points in the second sample are the vertices of a square, and building the house around all the points is one optimal solution.