Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) (sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg)),arg)

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using namespace std;
using R=long double;

int n,x[110],y[110];

using R=long double;
const R PI = acos(R(-1));
const R INF = 1e40;
using P=complex<R>;
using C=tuple<R,R,R>;
#define mod(x,y) fmod(fmod(x,y)+y,y)

inline C shadow(R theta){
	R a=0.0,b=0.0,c=2.0*n;

	using state=tuple<R,int>;
	vector<state> ary;

	rep(i,n) ary.push_back(make_tuple(1.0*x[i]*sin(theta)+1.0*y[i]*cos(theta),i));
	sort(_all(ary));
	
	rep(i,n-1){
		R cur,nxt; int idx,idx2;
		tie(cur,idx)=ary[i],tie(nxt,idx2)=ary[i+1];
		if(nxt-cur<2.0){
			c-=2.0;
			a+=(x[idx2]-x[idx]),b+=(y[idx2]-y[idx]);
		}
	}
	return make_tuple(a,b,c);
}

int main(void){
	while(cin >> n,n){		
		vector<R> candiate={0.0,PI/2.0,PI};
		rep(i,n) cin >> x[i] >> y[i];
		cout.precision(20);

		rep(j,n)rep(i,j){
			P a=P(x[i],y[i]),b=P(x[j],y[j]);
			R c=arg(b-a),e=asin(2.0/abs(b-a));
			candiate.push_back(mod(PI-c,PI));
			candiate.push_back(mod(PI-c+e,PI));
			candiate.push_back(mod(PI-c-e,PI));
		}

		uniq(candiate);
		candiate.push_back(candiate[0]+PI);	
		int m=int(candiate.size());

		rep(i,m-1){
			R cur=candiate[i],nxt=candiate[i+1],a,b,c;
			tie(a,b,c)=shadow((cur+nxt)/2.0);
			R theta=mod(atan(a/b),PI);
			if(cur < mod(theta,PI) && mod(theta,PI) < nxt) candiate.push_back(mod(theta,PI));
		}	

		R cmin=INF,theta1=-1.0;
		for(auto &theta:candiate){
			R a,b,c;
			tie(a,b,c)=shadow(theta);
			if(chmin(cmin,a*sin(theta)+b*cos(theta)+c)) theta1=theta;
		}
		cout << fixed << theta1 << endl;
		
		R cmax=0.0,theta2=-1.0;
		for(auto &theta:candiate){
			R a,b,c;
			tie(a,b,c)=shadow(theta);
			if(chmax(cmax,a*sin(theta)+b*cos(theta)+c)) theta2=theta;
		}
		cout << fixed << theta2 << endl;

	}
	return 0;
}