Minimum Triangle Perimeter

No attempts yetTime limit5sMemory limit512 MB

Problem

You are given a set of points with integer coordinates. Choose three distinct points from the set and report the smallest perimeter their triangle can have.

The perimeter of a triangle is the sum of the three distances between the chosen points. A degenerate triangle, one whose three points lie on a single line and whose area is 0, counts as a triangle.

Input

The first line contains the number of test cases TT. Then TT test cases follow.

The first line of each test case contains the number of points nn. Each of the next nn lines contains two integers xix_i, yiy_i separated by a space, 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
  • 3n100003 \le n \le 10000

Output

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

Case #X: Y

XX is the test case number, counted from 1. YY is the minimum perimeter rounded to six digits after the decimal point. Print all six digits even when they are zeros.