Impromptu Outdoor Gallery

Given N points in general position, find twice the smallest area of a simple quadrilateral formed by four of them.

Medium6GeometryBrute forceNo attempts yetMemory limit1024 MB

Problem

The artist Cody-Jamal recently decided to out-hip all of his hipster friends by showing his latest paintings in an impromptu outdoor gallery. He is going to show up in a field, put up some paintings, and display them.

The field has NN posts in it, and no three of them are collinear (which also means that no two posts are in the same place). Cody-Jamal is going to choose four of them, in order, and call them p1,p2,p3p_1, p_2, p_3, and p4p_4. He will then string velvet ropes between p1p_1 and p2p_2, p2p_2 and p3p_3, p3p_3 and p4p_4, and finally p4p_4 and p1p_1. He must choose the four ordered posts so that no two ropes cross. In other words, p1p2p3p4p_1p_2p_3p_4 must be a simple quadrilateral. The quadrilateral may be convex or concave. He will then hang his paintings inside the region enclosed by the ropes.

To attract wealthy art lovers who might buy his paintings, Cody-Jamal is hiring waitstaff to walk around and serve refreshments to visitors. The cost of the refreshments is fixed, but the cost of the waitstaff is proportional to the area they have to walk. They charge 2 artcoins per square meter. Therefore, Cody-Jamal wants to choose p1,p2,p3p_1, p_2, p_3, and p4p_4 to minimize the area of the quadrilateral p1p2p3p4p_1p_2p_3p_4, and so minimize the cost (in artcoins) of the refreshment service. What is this minimum cost?

Input

The first line of the input gives the number of test cases, TT. TT test cases follow. Each test case begins with a line containing a single integer NN, the number of posts in the field. NN more lines follow. The ii-th of them contains two integers XiX_i and YiY_i: the coordinates of the ii-th post, in meters from an arbitrary origin.

Output

For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the minimum number of artcoins Cody-Jamal has to pay. In other words, y is twice the area (in square meters) of a smallest simple quadrilateral that has four of the input points as vertices. This value is always an integer.

Constraints

  • 1T1001 \le T \le 100
  • 4N10004 \le N \le 1000
  • 109Xi109-10^9 \le X_i \le 10^9 for all ii.
  • 109Yi109-10^9 \le Y_i \le 10^9 for all ii.
  • No three points in the input are collinear.

Hint

In Case #1, there are only 4 points in the input, and every ordering that forms a simple quadrilateral gives a square with side length 10.

In Cases #2 and #3, an optimal choice is to leave out the first point and use the last four, in the order given in the input.