Problem: Given several points on a plane, let’s try to solve a puzzle connecting them with a zigzag line. The puzzle is to find the zigzag line that passes through all the given points with the minimum number of turns. Moreover, when there are several zigzag lines with the minimum number of turns, the shortest one among them should be found.

For example, consider nine points given in Figure 1.

<image>

Figure 1: Given nine points

A zigzag line is composed of several straight line segments. Here, the rule requests that each line segment should pass through two or more given points.

A zigzag line may turn at some of the given points or anywhere else. There may be some given points passed more than once.

<image>

Figure 2: Zigzag lines with three turning points.

Two zigzag lines with three turning points are depicted in Figure 2 (a) and (b) for the same set of given points shown in Figure 1. The length of the zigzag line in Figure 2 (a) is shorter than that in Figure 2 (b). In fact, the length of the zigzag line in Figure 2 (a) is the shortest so that it is the solution for the nine points given in Figure 1.

Another zigzag line with four turning points is depicted in Figure 3. Its length is shorter than those in Figure 2, however, the number of turning points is greater than those in Figure 2, and thus, it is not the solution.

<image>

Figure 3: Zigzag line with four turning points.

There are two zigzag lines that passes another set of given points depicted in Figure 4 (a) and (b).

Both have the same number of turning points, and the line in (a) is longer than that in (b). However, the solution is (a), because one of the segments of the zigzag line in (b) passes only one given point, violating the rule.

<image>

Figure 4: Zigzag line with two turning points (a), and not a zigzag line concerned (b).

Your job is to write a program that solves this puzzle.



Input

The input consists of multiple datasets, followed by a line containing one zero. Each dataset has the following format.


n
x1 y1
.
.
.
xn yn


Every input item in a dataset is a non-negative integer. Items in a line are separated by a single space.

n is the number of the given points. xk and yk (k = 1, . . . , n) indicate the position of the k-th point. The order of the points is meaningless. You can assume that 2 ≤ n ≤ 10, 0 ≤ xk ≤ 10, and 0 ≤ yk ≤ 10.

Output

For each dataset, the minimum number of turning points and the length of the shortest zigzag line with that number of turning points should be printed, separated by a space in a line. The length should be in a decimal fraction with an error less than 0.0001 (= 1.0 × 10-4 ).

You may assume that the minimum number of turning points is at most four, that is, the number of line segments is at most five.

The example solutions for the first four datasets in the sample input are depicted in Figure 5 and 6.

Example

Input

2
0 0
10 9
4
0 0
3 1
0 3
3 3
10
2 2
4 2
6 2
2 4
4 4
6 4
2 6
4 6
6 6
3 3
10
0 0
2 0
4 0
0 2
2 2
4 2
0 4
2 4
4 4
6 8
9
0 0
1 0
3 0
0 1
1 1
3 1
0 2
1 2
2 2
10
0 0
1 0
0 1
1 1
9 9
9 10
10 9
10 10
0 2
10 8
10
0 0
0 10
2 0
2 1
2 7
2 10
5 1
6 7
9 2
10 9
0


Output

0 13.45362405
1 18.48683298
3 24.14213562
4 24.94813673
3 12.24264069
3 60.78289622
3 502.7804353

Solution (in CPP):

Solution:
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<ctime>
#include<map>
#include<string>
#include<vector>
#include<set>

using namespace std;
#define For(i,l,r) for (int i = l; i <= r; ++i)
#define Cor(i,l,r) for (int i = l; i >= r; --i)
#define Fill(a,b) memset(a,b,sizeof(a))
#define FI first
#define SE second
#define MP make_pair
#define PII pair<int,int>
#define flt double
#define INF (0x3f3f3f3f)
#define MaxN 1020304
#define MaxNode 1020304
#define MD 1000000007
#define ele(x) (1 << ((x) - 1))
#define PFF pair<flt,flt>
#define UPD(a,b) { a = min(a,b); }

const flt eps = 1e-7;
int dcmp(flt x) {
	return (x < -eps) ? -1 : ((x > eps) ? 1 : 0);
}

PFF operator - (PFF a,PFF b) { return MP(a.FI - b.FI,a.SE - b.SE); }
PFF operator + (PFF a,PFF b) { return MP(a.FI + b.FI,a.SE + b.SE); }
PFF operator * (PFF a,flt b) { return MP(a.FI * b,a.SE * b); }
flt operator * (PFF a,PFF b) { return a.FI * b.SE - a.SE * b.FI; }
flt operator / (PFF a,PFF b) { 
	if (dcmp(b.FI)) return a.FI / b.FI;
	return a.SE / b.SE;
}

flt dot(PFF a,PFF b) { return a.FI * b.FI + a.SE * b.SE; }
flt mod(PFF a) {
	return sqrt(a.FI * a.FI + a.SE * a.SE); 
}

bool Longer(PFF a,PFF b,PFF c) {
	return dcmp((c - a) / (b - a) - 1.) >= 0;
}

flt xmul(PFF a,PFF b,PFF c) {
	return (c - a) * (c - b);
}

PFF GetInter(PFF a,PFF b,PFF c,PFF d) {
	PFF as = a, ae = a + b;
	PFF bs = c,be = c + d;
	flt u = xmul(as,ae,bs);
	flt v = xmul(ae,as,be);
	if (dcmp(u + v) == 0) return MP(-INF,-INF);
	return MP(bs.FI * v + be.FI * u,bs.SE * v + be.SE * u) * (1. / (u + v));
}

int n;
PFF a[MaxN]; pair<int,flt> f[1111][11][11];

int main() {
	//freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
	while (scanf("%d",&n) != EOF && n) {
		For(i,1,n) scanf("%lf%lf",&a[i].FI,&a[i].SE);
		int All = (1 << n) - 1;
		For(i,1,n) For(j,1,n) For(k,0,All) f[k][i][j] = MP(INF,INF);
		For(i,1,n) For(j,1,n) if (i != j) {
			f[ele(i) | ele(j)][i][j] = MP(0,mod(a[i] - a[j]));
		}
		For(S,0,All) For(i,1,n) For(j,1,n) if (f[S][i][j].FI < n) {
			For(k,1,n) if (!(S & ele(k))) {
				int tInc = 1;
				if (dcmp(fabs((a[k] - a[i]) * (a[i] - a[j]))) == 0 && Longer(a[j],a[i],a[k])) tInc = 0; 
				UPD(f[S | ele(k)][k][i],MP(f[S][i][j].FI + tInc,f[S][i][j].SE + mod(a[k] - a[i])));
			}
			For(k,1,n) if (!(S & ele(k))) {
				For(l,1,n) if (!(S & ele(l)) && k != l) {
					if (dcmp((a[i] - a[j]) * (a[l] - a[k])) != 0) {
						if (k == 4 && l == 3) {
							int z = k;
						}
						PFF tInter = GetInter(a[j],a[i] - a[j],a[k],a[l] - a[k]);
						if (Longer(a[j],a[i],tInter) && Longer(a[l],a[k],tInter)) {
							UPD(f[S | ele(k) | ele(l)][l][k],MP(f[S][i][j].FI + 1,f[S][i][j].SE + mod(tInter - a[i]) + mod(tInter - a[l])));
						}
					}
				}
			}
		}
		pair<int,flt> ans = MP(INF,INF);
		For(i,1,n) For(j,1,n) ans = min(ans,f[All][i][j]);
		printf("%d %.12lf\n",ans.FI,ans.SE);
	}
	return 0;
}