Problem: Brave Ponta has finally arrived at the final dungeon. This is a dark wilderness in front of the fort of the evil emperor Boromos, with fairly strong monsters guarding their territories.

<image>


Figure 1: Wilderness

As shown in Fig. 1, the wilderness is represented by a 4 × 4 square region with the southwest as the origin (0, 0). Inside this area are monsters, as shown by the dots in the figure. Brave Ponta must cross this area from west to east (W to E). That is, you must start from the point where the x coordinate is 0.0 and the y coordinate is 0.0 or more and 4.0 or less, and move to the point where the x coordinate is 4.0 and the y coordinate is 0.0 or more and 4.0 or less.

When an enemy enters the area, the monster attacks the enemy if the distance between him and the enemy is shorter than the distance between any other monster and the enemy.

Now that there are not enough items, it was Ponta who really wanted to avoid fighting as much as possible before fighting Boromos. There, Ponta noticed: If you follow the path where there are always two or more monsters with the shortest distance to you, you won't be attacked by monsters.

Whether the brave Ponta can reach Boromos unscathed depends on your control. Create a program to find the shortest distance through the dark wilderness.

For reference, the shortest path in FIG. 1 is shown in FIG.

<image>


Figure 2: Shortest path



Input

Multiple datasets are given as input. Each dataset is given in the following format:

n (number of monsters: integer)
x1 y1 (Position of the first monster: Real number separated by blanks)
x2 y2 (Position of the second monster: Real number separated by blanks)
..
..
xn yn (position of nth monster: real number separated by blanks)


n is 1 or more and 20 or less. The x and y coordinate values ​​that indicate the position of the monster are 0.0 or more and 4.0 or less.

When n is 0, it indicates the end of input.

Output

Output the shortest distance on one line for each dataset. If you can't cross the wilderness without being attacked by a monster, print "impossible".

The distance output may have an error of 0.00001 or less.

Example

Input

2
1 1
3 3
4
1.0 0.5
1.0 2.5
3.0 1.5
3.0 3.5
1
2.0 2.0
0


Output

5.656854249492
4.618033988750
impossible

Solution (in CPP):

Solution:
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <complex>
#include <queue>
#include <cstdio>
using namespace std;

const double EPS = 1e-9;
const double PI = acos(-1);

typedef complex<double> P;
typedef vector<P> G;

struct L :public vector<P> {
	L(const P &a,const P &b){
		push_back(a);
		push_back(b);
	}
};

#define next(P,i) (P[(i+1)%P.size()])
#define curr(P,i) (P[(i+0)%P.size()])

double cross(const P &a,const P &b){
	return imag(conj(a)*b);
}
double dot(const P &a,const P &b){
	return real(conj(a)*b);
}

int ccw(P a,P b,P 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;
}

P crosspoint(const L &l,const L &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) return m[0];
	return m[0]+B/A*(m[1]-m[0]);
}


G convex_cut(const G &poly,const L &l){
	G Q;
	for(int i = 0 ; i < poly.size() ; i++){
		P A = curr(poly,i) , B = next(poly,i);
		if( ccw(l[0],l[1],A)!=-1)Q.push_back(A);
		if( ccw(l[0],l[1],A)*ccw(l[0],l[1],B)<0)Q.push_back(crosspoint(L(A,B),l));
	}
	return Q;
		 
}

L bisector(P a,P b){
	P A = (a+b) * P(0.5,0);
	return L(A,A+(b-a)*P(0,PI/2));
}
G voronoi(G g,vector<P> v,int s){
	for(int i = 0 ; i < v.size() ; i++){
		if( i != s ){
			g = convex_cut(g,bisector(v[s],v[i]));
		}
	}
	return g;
}

int main(){
	int n;
	while(cin >> n && n){
		G area,p;
		area.push_back(P(0,0));
		area.push_back(P(0,4));
		area.push_back(P(4,4));
		area.push_back(P(4,0));
		
		for(int i = 0 ; i < n ; i++){
			double x,y;
			cin >> x >> y;
			p.push_back(P(x,y));
		}
		vector<L> l;
		vector<P> vertex;
		
		for(int i = 0 ; i < n ; i++){
			G v = voronoi(area,p,i);
			for(int j = 0 ; j < v.size() ; j++){
				vertex.push_back(v[j]);
				//cout << i << ": " << v[j] << endl;
				l.push_back(L(curr(v,j),next(v,j)));
				l.push_back(L(next(v,j),curr(v,j)));
			}
		}
		int done[16000]={};
		priority_queue< pair<double,int> , vector< pair<double,int> > , greater < pair<double,int> > > Q;
		for(int i = 0 ; i < n ; i++){
			if( fabs(vertex[i].real()) < EPS ){
				Q.push(make_pair(0,i));
			}
		}
		
		while(Q.size()){
			pair<double,int> q = Q.top(); Q.pop();
			if( done[q.second]++ )continue;
			if( fabs(vertex[q.second].real() - 4.0 ) < EPS ){
				printf("%.8lf%c",q.first,10);
				goto exit;
			}
			for(int i = 0 ; i < vertex.size() ; i++){
				L ll(vertex[q.second],vertex[i]);
				int f = false;
				for(int j = 0 ; j < l.size() ; j++){
					if( abs(l[j][0] - ll[0]) < EPS && abs(l[j][1]-ll[1]) <EPS ){
						f++;
					}
				}
				if(f >= 2) Q.push(make_pair(q.first+abs(ll[0]-ll[1]),i));
			}
		}
		cout << "impossible" << endl;
		
		exit:;
		
	}
}