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 <cstring>
#include <algorithm>
#include <cmath>
#include <vector>

using namespace std;

struct point_t {
	double x, y;
	point_t() { x = y = 0; }
	point_t(double tx, double ty) { x = tx, y = ty; }
	point_t operator+(const point_t &r) const {
		return point_t(x + r.x, y + r.y);
	}
	point_t operator-(const point_t &r) const {
		return point_t(x - r.x, y - r.y);
	}
	point_t operator*(const double &r) const {
		return point_t(x * r, y * r);
	}
	point_t operator/(const double &r) const {
		return point_t(x / r, y / r);
	}
	double l() const {
		return sqrt(x * x + y * y);
	}
	void read() { scanf("%lf%lf", &x, &y); }
};

const double eps = 1e-8;
int dblcmp(double x) {
	return x < -eps ? -1 : x > eps;
}

double dot(point_t p1, point_t p2) {
	return p1.x * p2.x + p1.y * p2.y;
}

double cross(point_t p1, point_t p2) {
	return p1.x * p2.y - p1.y * p2.x;
}

bool onseg(point_t p1, point_t p2, point_t p) {
	if (dblcmp(cross(p - p1, p2 - p1)) != 0) return false;
	return dblcmp(dot(p1 - p, p2 - p)) <= 0;
}

double dist(point_t p1, point_t p2) {
	p2 = p2 - p1;
	return p2.l();
}

const int maxn = 11;
int n, final;
point_t p[maxn];
int kill[maxn][maxn];

point_t isLL(point_t a, point_t b, point_t c, point_t d, bool &parell) {
	point_t p1 = b - a, p2 = d - c;
	double a1 = p1.y, b1 = -p1.x, c1;
	double a2 = p2.y, b2 = -p2.x, c2;
	if (dblcmp(a1 * b2 - a2 * b1) == 0) {
		parell = true;
		return point_t();
	} else {
		parell = false;
		c1 = a1 * a.x + b1 * a.y;
		c2 = a2 * c.x + b2 * c.y;
		return point_t((c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1), (c1 * a2 - c2 * a1) / (b1 * a2 - b2 * a1));
	}
}

double getscale(point_t v1, point_t v2) {
	if (dblcmp(v1.y) == 0) return v2.x / v1.x;
	return v2.y / v1.y;
}

pair<int, double> dp[maxn][maxn][1 << maxn];

void work() {
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			for (int mask = 0; mask <= final; ++mask) {
				dp[i][j][mask].first = 100;
			}
		}
	}
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			dp[i][j][kill[i][j]] = make_pair(0, dist(p[i], p[j]));
		}
	}
	for (int mask = 0; mask <= final; ++mask) {
		for (int v = 1; v <= n; ++v) {
			for (int u = 1; u <= n; ++u) {
				if (dp[u][v][mask].first == 100) continue;
				point_t dir = p[u] - p[v];
				for (int i = 1; i <= n; ++i) {
					for (int j = 1; j <= n; ++j) {
						if (i == j) continue;
						bool parell = false;
						point_t is = isLL(p[u], p[u] + dir, p[i], p[j], parell);
						if (parell) continue;
						double len2 = dp[u][v][mask].second;
						double s1 = getscale(dir, is - p[u]);
						double s2 = getscale(p[j] - p[i], is - p[i]);
						if (dblcmp(s1) < 0 || dblcmp(s2 - 1) < 0) continue;
						len2 += dist(is, p[u]);
						len2 += dist(p[i], is);
						pair<int, double> &bind = dp[i][j][mask | kill[i][j]];
						bind = min(bind, make_pair(dp[u][v][mask].first + 1, len2));	
					}
				}
			}
		}
	}
}

int main() {
	while (scanf("%d", &n) != EOF) {
		if (n == 0) break;
		final = (1 << n) - 1;
		for (int i = 1; i <= n; ++i) p[i].read();
		for (int i = 1; i <= n; ++i) {
			for (int j = 1; j <= n; ++j) {
				int mask = 0;
				for (int k = 1; k <= n; ++k) {
					if (onseg(p[i], p[j], p[k])) mask |= (1 << (k - 1));
				}
				kill[i][j] = mask;
			}
		}
		work();
		pair<int, double> ans = make_pair(100, 0);
		for (int i = 1; i <= n; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == j) continue;
				ans = min(ans, dp[i][j][final]);
			}
		}
		printf("%d %.10lf\n", ans.first, ans.second);
	}
	return 0;
}