Largest Square

No attempts yetTime limit10sMemory limit256 MB

Problem

Given NN points on a plane, find the area of the largest square whose four vertices are all among the given points. The sides of the square need not be parallel to the coordinate axes; tilted squares are also allowed.

Input

The first line contains the number of test cases TT.

For each test case, the first line contains the number of points NN (4N30004 \le N \le 3000). Each of the next NN lines contains the xx and yy coordinates of a point, separated by a space. All coordinates are integers between 10000-10000 and 1000010000 inclusive, and no two points share the same position.

Output

For each test case, print the area of the largest square that can be formed, one per line. If no square can be formed, print 00.