#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:;
		
	}
}