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<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e+10;
const double PI = acos(-1);
int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline double ABS(double a){return max(a,-a);}
struct Pt {
	double x, y;
	Pt() {}
	Pt(double x, double y) : x(x), y(y) {}
	Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
	Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
	Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
	Pt operator-() const { return Pt(-x, -y); }
	Pt operator*(const double &k) const { return Pt(x * k, y * k); }
	Pt operator/(const double &k) const { return Pt(x / k, y / k); }
	double ABS() const { return sqrt(x * x + y * y); }
	double abs2() const { return x * x + y * y; }
	double arg() const { return atan2(y, x); }
	double dot(const Pt &a) const { return x * a.x + y * a.y; }
	double det(const Pt &a) const { return x * a.y - y * a.x; }
};
double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(Pt a, Pt b, Pt c) {
	int s = sig((b - a).det(c - a));
	if (s) return s;
	if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
	if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
	return 0;
}
int iLL(Pt a, Pt b, Pt c, Pt d) {
	if (sig((b - a).det(d - c))) return 1; // intersect
	if (sig((b - a).det(c - a))) return 0; // parallel
	return -1; // correspond
}
Pt pLL(Pt a, Pt b, Pt c, Pt d) {
	b = b - a; d = d - c; return a + b * (c - a).det(d) / b.det(d);
}

pair<int,double> dp[1<<10][11][11];
Pt p[12];
int main(){
	int a;
	while(scanf("%d",&a),a){
		for(int i=0;i<a;i++){
			double x,y;
			scanf("%lf%lf",&x,&y);
			p[i]=Pt(x,y);
		}
		for(int i=0;i<(1<<a);i++)for(int j=0;j<a;j++)for(int k=0;k<a;k++)
			dp[i][j][k]=make_pair(999999999,999999999);
		for(int i=0;i<a;i++){
			for(int j=0;j<a;j++){
				if(i==j)continue;
				int to=(1<<i)+(1<<j);
				for(int k=0;k<a;k++){
					if(iSP(p[i],p[k],p[j])==2)to|=(1<<k);
				}
				dp[to][i][j]=make_pair(0,(p[i]-p[j]).ABS());
			}
		}
		for(int i=0;i<(1<<a);i++){
			for(int j=0;j<a;j++)for(int k=0;k<a;k++){
				if(dp[i][j][k].first>99999)continue;
				for(int l=0;l<a;l++){
					int to=i|(1<<l);
					for(int m=0;m<a;m++){
						if(iSP(p[k],p[m],p[l])==2)to|=(1<<m);
					}
					dp[to][k][l]=min(dp[to][k][l],make_pair(dp[i][j][k].first+1,dp[i][j][k].second+(p[k]-p[l]).ABS()));
				}
				for(int l=0;l<a;l++)for(int m=0;m<a;m++){
					if(l==m)continue;
					if(iLL(p[j],p[k],p[l],p[m])!=1)continue;
					Pt t=pLL(p[j],p[k],p[l],p[m]);
					if(iSP(p[j],p[k],t)==2&&iSP(t,p[l],p[m])==2){
						int to=i|(1<<l)|(1<<m);
						for(int n=0;n<a;n++){
							if(iSP(t,p[n],p[m])==2)to|=(1<<n);
						}
						dp[to][l][m]=min(dp[to][l][m],make_pair(dp[i][j][k].first+1,dp[i][j][k].second+(t-p[k]).ABS()+(p[m]-t).ABS()));
					}
				}
			}
		}
		pair<int,double>ret=make_pair(999999999,99999999);
		for(int i=0;i<a;i++)for(int j=0;j<a;j++)ret=min(ret,dp[(1<<a)-1][i][j]);
		printf("%d %.12f\n",ret.first,ret.second);
	}
}