Minimum Triangle Perimeter

No attempts yetTime limit90sMemory limit512 MB

Problem

You are given a set of points whose coordinates are all integers. Pick three distinct points of the set to form a triangle, and find the smallest perimeter such a triangle can have.

A triangle whose three points lie on one line and whose area is zero still counts. The perimeter is the sum of the three pairwise Euclidean distances.

Input

The first line holds the number of test cases, TT. TT test cases follow.

The first line of each test case holds nn, the number of points in the set. Each of the next nn lines holds two integers xix_i and yiy_i, the coordinates of the ii-th point. No two points share the same coordinates.

Limits

  • 1T151 \le T \le 15
  • 0xi,yi1090 \le x_i, y_i \le 10^9
  • 3n1063 \le n \le 10^6

Output

For each test case, print one line in this format.

Case #X: Y

XX is the test case number starting at 1 and YY is the minimum perimeter. Print YY with exactly six digits after the decimal point, rounding the seventh digit half up.