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 <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

#include <complex>

typedef complex<double> Point;

struct Line : public vector<Point> {
  Line() {;}
  Line(Point a, Point b) { push_back(a); push_back(b); }
};

inline double cross(const Point &a, const Point &b) {
  return imag(conj(a) * b);
}

inline double dot(const Point &a, const Point &b) {
  return real(conj(a) * b);
}

inline int ccw(Point a, Point b, Point c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) { return 1; }
  if (cross(b, c) < 0) { return -1; }
  if (dot(b, c) < 0) { return 2; }
  if (norm(b) < norm(c)) { return -2; }
  return 0;
}

bool intersectSS(const Line &s, const Line &t) {
  return ccw(s[0], s[1], t[0]) * ccw(s[0], s[1], t[1]) <= 0 &&
    ccw(t[0], t[1], s[0]) * ccw(t[0], t[1], s[1]) <= 0;
}

bool intersectSP(const Line &s, const Point &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}

Point crosspointSS(const Line &l, const Line &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) {
    assert(false);
    if (intersectSP(l, m[0])) { return m[0]; }
    if (intersectSP(l, m[1])) { return m[1]; }
    if (intersectSP(m, l[0])) { return l[0]; }
    if (intersectSP(m, l[1])) { return l[1]; }
    return m[0];
  }
  if (abs(A) < EPS) { assert(false); }
  return m[0] + B / A * (m[1] - m[0]);
}

int n;
Point p[100];
pair<int, double> memo1[1 << 10][10][10];
pair<int, double> memo2[10][10][10][10];


int OnLine(int used, const Line &l) {
  REP(i, n) {
    if ((used >> i) & 1) { continue; }
    if (intersectSP(l, p[i])) { used |= 1 << i; }
  }
  return used;
}

pair<int, double> NextState(int from, int to, int nfrom, int nto) {
  if (memo2[from][to][nfrom][nto].first != -1) { return memo2[from][to][nfrom][nto]; }
  pair<int, double> ret(0, 0);
  Line pl = Line(p[to], p[to] + (p[to] - p[from]) * 1000.0);
  Line nl = Line(p[nfrom], p[nfrom] - (p[nto] - p[nfrom]) * 1000.0);
  double A = cross(pl[1] - pl[0], nl[1] - nl[0]);
  if (abs(A) < EPS || !intersectSS(pl, nl)) {
    ret.first = -2;
  } else {
    Point cp = crosspointSS(pl, nl);
    pl = Line(p[to], cp);
    nl = Line(cp, p[nto]);
    int nused = (1 << from) | (1 << to) | (1 << nfrom) | (1 << nto);
    double ndist = abs(p[to] - cp) + abs(cp - p[nto]);
    nused = OnLine(nused, pl);
    nused = OnLine(nused, nl);

    ret.first = nused;
    ret.second = ndist;
  }
  return memo2[from][to][nfrom][nto] = ret;
}

pair<int, double> calc(int used, int from, int to) {
  if (memo1[used][from][to].first != -1) { return memo1[used][from][to]; }
  if ((used | (1 << to)) == (1 << n) - 1) {
    return make_pair(0, 0);
  }
  pair<int, double> ret(1000, 1e+10);
  REP(nto, n) {
    if (nto == from) { continue; }
    if ((used >> nto) & 1) { continue; }
    REP(nfrom, n) {
      if (nfrom == nto) { continue; }
      if (((used >> nfrom) & 1) && nfrom != to) { continue; }
      pair<int, double> nstate = NextState(from, to, nfrom, nto);
      if (nstate.first == -2) { continue; }

      int nused = used | nstate.first;
      double ndist = nstate.second;
      pair<int, double> nret = calc(nused, nfrom, nto);
      nret.first++;
      nret.second += ndist;
      ret = min(ret, nret);
    }
  }
  return memo1[used][from][to] = ret;
}

int main() {
  while (scanf("%d", &n), n) {
    REP(i, n) {
      double x, y;
      scanf("%lf %lf", &x, &y);
      p[i] = Point(x, y);
    }
    pair<int, double> ans(1000, 1e+10);
    MEMSET(memo1, -1);
    MEMSET(memo2, -1);
    REP(i, n) {
      REP(j, n) {
        if (i == j) { continue; }
        int used = (1 << i) | (1 << j);
        used = OnLine(used, Line(p[i], p[j]));
        pair<int, double> nans = calc(used, i, j);
        nans.second += abs(p[i] - p[j]);
        ans = min(ans, nans);
      }
    }
    printf("%d %.8f\n", ans.first, ans.second);
  }
}