#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <cmath>
using namespace std;
const double EPS = 1e-12;
const double INF = 1e18;
const double PI = acos(-1);

//range : [-PI/2, PI/2]
vector<double> special_angle(vector<double> &x, vector<double> &y){
    int n = x.size();
    vector<double> ret;
    for(int i=0; i<n; i++){
        for(int j=i+1; j<n; j++){
            double narg[2];
            double a = x[i] -x[j];
            double b = y[i] -y[j];
            //中心が重なる角度
            narg[0] = (abs(a) < EPS)? PI/2 : atan(-b/a);
            ret.push_back(narg[0]);
            //端が重なる角度
            if(abs(a) < EPS){
            	narg[0] = acos(2/b);
            	narg[1] = acos(-2/b);
            }else{
            	narg[0] = asin(2/sqrt(a*a +b*b)) -atan(b/a);
            	narg[1] = asin(-2/sqrt(a*a +b*b)) -atan(b/a);
            }
            for(int k=0; k<2; k++){
                while(narg[k] < -PI/2) narg[k] += PI;
                while(narg[k] > PI/2) narg[k] -= PI;
                ret.push_back(narg[k]);
            }
        }
    }
    
    ret.push_back(PI/2);
    ret.push_back(0);
    ret.push_back(-PI/2);
    sort(ret.begin(), ret.end());
    ret.erase(unique(ret.begin(), ret.end()), ret.end());
    return ret;
}

vector<double> projection(double angle, vector<double> &x, vector<double> &y){
	int n = x.size();
	vector<double> ret(n);
	for(int i=0; i<n; i++){
		ret[i] = x[i]*sin(angle) +y[i]*cos(angle);
	}
    return ret;
}

vector<int> getorder(double angle, vector<double> &x, vector<double> &y){
    int n = x.size();
    vector<int> ret(n);
    vector<double> dist = projection(angle, x, y);
    vector<pair<double, int> > ord(n);
    for(int i=0; i<n; i++){
        ord[i] = make_pair(dist[i], i);
    }
    sort(ord.begin(), ord.end());
    for(int i=0; i<n; i++){
        ret[i] = ord[i].second;
    }
    return ret;
}

double getwidth(double angle, vector<double> &x, vector<double> &y){
    vector<int> order = getorder(angle, x, y);
    vector<double> dist = projection(angle, x, y);
    double ret = 2;
    for(int i=0; i<(int)x.size()-1; i++){
    	double d = dist[order[i+1]] -dist[order[i]];
        if(d < 2) ret += d;
        else ret += 2;
    }
    return ret;
}

pair<double, double> solve(vector<double> &x, vector<double> &y){
    vector<double> angle = special_angle(x, y);
    vector<pair<double, double> > cand; //pair<angle, width>
    
    for(int i=0; i<(int)angle.size(); i++){
        cand.push_back(make_pair(angle[i], getwidth(angle[i], x, y)));
    }
    for(int i=0; i<(int)angle.size()-1; i++){
        double mid = (angle[i] +angle[i+1])/2;
        vector<int> order = getorder(mid, x, y);
        vector<double> dist = projection(mid, x, y);
        //f(t) = a*sin(t) +b*cos(t) +c
        double a=0, b=0;
        for(int j=0; j<(int)x.size()-1; j++){
        	double d = dist[order[j+1]] -dist[order[j]];
        	if(d < 2){
        		a += x[order[j+1]] -x[order[j]];
        		b += y[order[j+1]] -y[order[j]];
        	}
        }
        //f'(t) = a*cos(t) -b*sin(t) = 0 より
        //tan(t) = a/b
        if(abs(b) < EPS) continue;
        double theta = atan(a/b);
        if(angle[i] -EPS < theta && theta < angle[i+1] +EPS){
        	cand.push_back(make_pair(theta, getwidth(theta, x, y)));
        }
    }
    
    double wmin=INF, wmax=0;
    double amin=INF, amax=INF;
    for(int i=0; i<(int)cand.size(); i++){
        double theta = cand[i].first;
        double width = cand[i].second;
        if(width < wmin){
            wmin = width;
            amin = theta;
        }
        if(width > wmax){
            wmax = width;
            amax = theta;
        }
    }
    
    //[0, PI]に変換
    if(abs(amin)<EPS) amin = 0;
    if(abs(amax)<EPS) amax = 0;
    if(amin < 0) amin += PI;
    if(amax < 0) amax += PI;
    return make_pair(amin, amax);
}

int main(){
    while(1){
        int n;
        cin >> n;
        if(n==0) break;
        
        vector<double> x(n),y(n);
        for(int i=0; i<n; i++){
            cin >> x[i] >> y[i];
        }
        pair<double, double> ans = solve(x, y);
        cout << fixed;
        cout << setprecision(12);
        cout << ans.first << endl << ans.second << endl;
    }
    return 0;
}


Measured memory_bytes: 3828