Two Rectangles
Time limit1sMemory limit128 MB
Cover all given points with two non-overlapping axis-aligned rectangles and minimize the larger area.
Problem
You are given points in the plane. Cover all of them with two axis-parallel rectangles, and make the area of the larger rectangle as small as you can.
The two rectangles must not overlap. Touching along an edge or at a corner is allowed. The two rectangles do not have to be the same shape or the same size. A rectangle may have width or height , and then its area is .
Every point has to lie inside one of the two rectangles or on its boundary.

The arrangement in the picture is not an answer, because the larger rectangle can still be shrunk. The points drawn there are the second block of the first test case below.
Input
Input arrives on standard input. The first line holds the number of test cases ().
Each test case starts with a line holding the number of points (). The next lines each hold the coordinates of one point as two integers. Every coordinate is an integer between and . The same point may be given more than once.
Output
Write to standard output. For each test case, print on its own line the area of the larger of the two rectangles, minimized.