#include <stdio.h>
#include <math.h>
double width(double ox[], double oy[], double angle, int n)
{
	int i, j;
	double width = 0.0;
	
	double x[n];
	double y[n];
	
	double roll = angle - M_PI_2;
	int leftFirst = 0;
	
	double tmpX, tmpY;
	double edge[n*2];
	int begin[n+2];
	double tmp;
	int tmp2;
	int stack;
	double left;
	
	for (i = 0; i < n; i++)
	{
		tmpX = ox[i];
		tmpY = oy[i];
		x[i] = tmpX * cos(roll) - tmpY * sin(roll);
		y[i] = tmpX * sin(roll) + tmpY * cos(roll);
	}
	for (i = 0; i < n; i++)
	{
		edge[i * 2] = x[i] - 1.0;
		begin[i * 2] = 1;
		edge[i * 2 + 1] = x[i] + 1.0;
		begin[i * 2 + 1] = 0;
	}
	for (i = 0; i < n * 2; i++)
	{
		for (j = 0; j < n * 2; j++)
		{
			if (edge[j] > edge[i])
			{
				tmp = edge[i];
				edge[i] = edge[j];
				edge[j] = tmp;
				tmp2 = begin[i];
				begin[i] = begin[j];
				begin[j] = tmp2;
			}
		}
	}
	stack = 0;
	left = 0.0;
	for (i = 0; i < n * 2; i++)
	{
		if (begin[i])
		{
			if (stack == 0)
			{
				left = edge[i];
			}
			stack++;
		}
		else
		{
			stack--;
			if (stack == 0)
			{
				width += edge[i] - left;
			}
		}
	}
	return width;
}
int main()
{
	int i, j;
	int n;
	
	double x[30];
	double y[30];
	double min;
	double minW; 
	double max;
	double maxW;
	double angle;
	double res;
	
	while (1)
	{
		scanf("%d", &n);
		if (n == 0) break;
		for (i = 0; i < n; i++)
		{
			scanf("%lf", &x[i]);
			scanf("%lf", &y[i]);
		}
		
		min = 1000.0;
		minW = 1000.0; 
		max = 0.0;
		maxW = 0.0;
		for (i = 0; i < M_PI * 10000000; i++)
		{
			angle = i * 0.0000001;
			res = width(x, y, angle, n);
			if (minW > res)
			{
				minW = res;
				min = angle;
			}
			if (maxW < res)
			{
				maxW = res;
				max = angle;
			}
		}
		printf("%.10f\n", min);
		printf("%.10f\n", max);
	}
	return 0;
}