Long long ago, there were several identical columns (or cylinders) built vertically in a big open space near Yokohama (Fig. F-1). In the daytime, the shadows of the columns were moving on the ground as the sun moves in the sky. Each column was very tall so that its shadow was very long. The top view of the shadows is shown in Fig. F-2.

The directions of the sun that minimizes and maximizes the widths of the shadows of the columns were said to give the important keys to the secrets of ancient treasures.

<image>
Fig. F-1: Columns (or cylinders)

<image>
Gig. F-2: Top view of the columns (Fig. F-1) and their shadows

The width of the shadow of each column is the same as the diameter of the base disk. But the width of the whole shadow (the union of the shadows of all the columns) alters according to the direction of the sun since the shadows of some columns may overlap those of other columns.

Fig. F-3 shows the direction of the sun that minimizes the width of the whole shadow for the arrangement of columns in Fig. F-2.

<image>
Fig. F-3: The direction of the sun for the minimal width of the whole shadow



Fig. F-4 shows the direction of the sun that maximizes the width of the whole shadow. When the whole shadow is separated into several parts (two parts in this case), the width of the whole shadow is defined as the sum of the widths of the parts.

<image>
Fig. F-4: The direction of the sun for the maximal width of the whole shadow



A direction of the sun is specified by an angle θ defined in Fig. F-5. For example, the east is indicated by θ = 0, the south by θ = π/2, and the west by θ = π. You may assume that the sun rises in the east (θ = 0) and sets in the west (θ = π).

Your job is to write a program that, given an arrangement of columns, computes two directions θmin and θmax of the sun that give the minimal width and the maximal width of the whole shadow, respectively.

The position of the center of the base disk of each column is specified by its (x, y) coordinates. The x-axis and y-axis are parallel to the line between the east and the west and that between the north and the south, respectively. Their positive directions indicate the east and the north, respectively.

You can assume that the big open space is a plane surface.

<image>
Fig. F-5: The definition of the angle of the direction of the sun

There may be more than one θmin or θmax for some arrangements in general, but here, you may assume that we only consider the arrangements that have unique θmin and θmax in the range 0 ≤ θmin < π, 0 ≤ θmax < π.



Input

The input consists of multiple datasets, followed by the last line containing a single zero.

Each dataset is formatted as follows.



n
x1 y1
x2 y2
...
xn yn


n is the number of the columns in the big open space. It is a positive integer no more than 100.

xk and yk are the values of x-coordinate and y-coordinate of the center of the base disk of the k-th column (k=1, ..., n). They are positive integers no more than 30. They are separated by a space.

Note that the radius of the base disk of each column is one unit (the diameter is two units). You may assume that some columns may touch each other but no columns overlap others.

For example, a dataset


3
1 1
3 1
4 3


corresponds to the arrangement of three columns depicted in Fig. F-6. Two of them touch each other.

<image>
Fig. F-6: An arrangement of three columns

Output

For each dataset in the input, two lines should be output as specified below. The output lines should not contain extra characters such as spaces.

In the first line, the angle θmin, the direction of the sun giving the minimal width, should be printed. In the second line, the other angle θmax, the direction of the sun giving the maximal width, should be printed.

Each angle should be contained in the interval between 0 and π (abbreviated to [0, π]) and should not have an error greater than ε=0.0000000001 (=10-10).

When the correct angle θ is in [0,ε], approximate values in [0,θ+ε] or in [π+θ-ε, π] are accepted. When the correct angle θ is in [π-ε, π], approximate values in [0, θ+ε-π] or in [θ-ε, π] are accepted.

You may output any number of digits after the decimal point, provided that the above accuracy condition is satisfied.

Example

Input

3
1 1
3 1
4 3
4
1 1
2 3
3 8
1 9
8
1 1
3 1
6 1
1 3
5 3
1 7
3 5
5 5
8
20 7
1 27
30 14
9 6
17 13
4 2
17 7
8 9
0


Output

2.553590050042226
0.982793723247329
1.570796326794896
2.819842099193151
1.325817663668032
2.094395102393196
2.777613697080149
0.588002603547568
#include<cmath>
#include<cstdio>
#include<vector>
#include<algorithm>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const double EPS=1e-11;
const double INF=1e77;
const double PI=acos(-1);

struct point{
	double x,y;
	point():x(0),y(0){}
	point(double x,double y):x(x),y(y){}
	point operator+(const point &a)const{ return point(x+a.x,y+a.y); }
	point operator-(const point &a)const{ return point(x-a.x,y-a.y); }
};

point operator*(double c,const point &a){ return point(c*a.x,c*a.y); }

double abs(const point &a){ return sqrt(a.x*a.x+a.y*a.y); }

point rot(const point &a,double theta){ return point(a.x*cos(theta)-a.y*sin(theta),a.x*sin(theta)+a.y*cos(theta)); }

double arg(const point &a){
	double t=atan2(a.y,a.x);
	return t<0?t+2*PI:t;
}

struct line{
	point a,b;
	line(){}
	line(const point &a,const point &b):a(a),b(b){}
};

struct circle{
	point c;
	double r;
	circle():c(point(0,0)),r(0){}
	circle(const point &c,double r):c(c),r(r){}
};

int tangent(const circle &C1,const circle &C2,vector<line> &res){
	double d=abs(C1.c-C2.c);
	if(d<EPS) return 0;

	int c=0;
	// 内接線
	if(C1.r+C2.r<d-EPS){
		double t=acos((C1.r+C2.r)/d);
		res.push_back(line(C1.c+rot(C1.r/d*(C2.c-C1.c), t),C2.c+rot(C2.r/d*(C1.c-C2.c), t)));
		res.push_back(line(C1.c+rot(C1.r/d*(C2.c-C1.c),-t),C2.c+rot(C2.r/d*(C1.c-C2.c),-t)));
		c+=2;
	}
	else if(C1.r+C2.r<d+EPS){
		point p=C1.c+C1.r/d*(C2.c-C1.c);
		res.push_back(line(p,p+rot(C2.c-C1.c,PI/2)));
		c++;
	}

	// 外接線
	if(abs(C1.r-C2.r)<d-EPS){
		double t1=acos((C1.r-C2.r)/d),t2=PI-t1;
		res.push_back(line(C1.c+rot(C1.r/d*(C2.c-C1.c), t1),C2.c+rot(C2.r/d*(C1.c-C2.c),-t2)));
		res.push_back(line(C1.c+rot(C1.r/d*(C2.c-C1.c),-t1),C2.c+rot(C2.r/d*(C1.c-C2.c), t2)));
		c+=2;
	}
	else if(abs(C1.r-C2.r)<d+EPS){
		point p=C1.c+C1.r/d*(C2.c-C1.c);
		res.push_back(line(p,p+rot(C2.c-C1.c,PI/2)));
		c++;
	}

	return c;
}

int n;
circle C[100];

// 影たちの位置関係は θ=φ の状態から変わらないとして, dw/dθ = 0 を達成する θ を求める. ( w : 影の長さ )
double calc_peak(double phi){
	pair<double,int> pos[100];
	rep(i,n){
		pos[i]=make_pair(rot(C[i].c,phi).y,i);
	}
	sort(pos,pos+n);

	double a=0,b=0; // dw/dθ = 0 <=> a*cos(θ) + b*sin(θ) = 0
	int pre=0;
	for(int i=1;i<=n;i++){
		if(i==n || pos[i-1].first+1<pos[i].first-1){
			// 今見ている影の連結成分は長さは d*sin(t-θ)+2
			double d=abs(C[pos[i-1].second].c-C[pos[pre].second].c);
			double t=arg(C[pos[i-1].second].c-C[pos[pre].second].c);
			// d*cos(t-θ) = d*cos(t)*cos(θ) + d*sin(t)*sin(θ)
			a+=d*cos(t);
			b+=d*sin(t);

			pre=i;
		}
	}

	double res=PI-atan2(-a,b);
	if(res>PI) res-=PI;
	return res;
}

double calc_width(double phi){
	double pos[100];
	rep(j,n){
		pos[j]=rot(C[j].c,phi).y;
	}
	sort(pos,pos+n);

	double res=0,x=-INF;
	rep(i,n){
		x=max(x,pos[i]-1);
		res+=max(pos[i]+1-x,(double)0);
		x=max(x,pos[i]+1);
	}
	return res;
}

int main(){
	while(scanf("%d",&n),n){
		rep(i,n) scanf("%lf%lf",&C[i].c.x,&C[i].c.y), C[i].r=1;

		vector<line> L;
		rep(i,n) rep(j,i) tangent(C[i],C[j],L);

		vector<double> T; // 二円の共通接線の角度
		rep(i,L.size()){
			double phi=PI-arg(L[i].b-L[i].a);
			if(phi<0) phi+=PI;
			T.push_back(phi);
		}
		T.push_back(0);
		T.push_back(PI);
		sort(T.begin(),T.end());
		// unique
		rep(i,(int)T.size()-1) if(T[i+1]-T[i]<EPS) T.erase(T.begin()+i--);

		double mini=INF,phi_mini;
		double maxi= 0 ,phi_maxi;
		rep(i,T.size()){
			double w=calc_width(T[i]);
			if(w<mini) mini=w, phi_mini=T[i];
			if(w>maxi) maxi=w, phi_maxi=T[i];

			if(i+1<T.size()){
				double phi0=(T[i]+T[i+1])/2;
				double phi1=calc_peak(phi0);

				w=calc_width(phi1);
				if(w<mini) mini=w, phi_mini=phi1;
				if(w>maxi) maxi=w, phi_maxi=phi1;
			}
		}
		printf("%.15f\n",phi_mini);
		printf("%.15f\n",phi_maxi);
	}

	return 0;
}