#include #include #include #include #include using namespace std; typedef double value_t; const double PI = acos(-1); struct Point { int x, y; }; struct Sum { value_t a, b, c; value_t val(value_t theta) const { return a * sin(theta) + b * cos(theta) + c; } double m_theta() const { return arg(complex(b, a)); } }; int n; Point p[100]; Sum bind(value_t theta) { pair X[n]; for(int i = 0; i < n; i++){ X[i].first = p[i].x * sin(theta) + p[i].y * cos(theta); X[i].second = i; } sort(&X[0], &X[n]); Sum sum; sum.a = sum.b = 0; sum.c = 2; for(int i = 1; i < n; i++){ if(X[i].first - X[i-1].first < 2){ sum.a += p[X[i].second].x - p[X[i-1].second].x; sum.b += p[X[i].second].y - p[X[i-1].second].y; }else{ sum.c += 2; } } return sum; } value_t f(value_t theta) { Sum sum = bind(theta); return sum.val(theta); } double adj(double a) { if(a < 0) return a + PI; if(a >= PI) return a - PI; return a; } void addArg(const Point& p, const Point& q, set& div) { complex a(p.x, p.y), b(q.x, q.y), d = a - b; div.insert(adj(-arg(d))); complex v1(-2, sqrt(norm(d) - 4)); div.insert(adj(-arg((d / v1) * complex(0, 1)))); complex v2(-2, -sqrt(norm(d) - 4)); div.insert(adj(-arg((d / v2) * complex(0, 1)))); } int main() { while(cin >> n && n) { for(int i = 0; i < n; ++i) { cin >> p[i].x >> p[i].y; } set div; div.insert(0.0); div.insert(PI); for(int i = 0; i < n; ++i) for(int j = i+1; j < n; ++j) addArg(p[i], p[j], div); double a, b; value_t af = 10000000.0, bf = 0.0; set::iterator it = div.begin(); double prev = *it++; while(it != div.end()) { double now = *it++; Sum sum = bind((prev + now) / 2); double t[3]; t[0] = adj(sum.m_theta()); t[1] = prev; t[2] = now; for(int i = 0; i < 3; ++i) { double m = t[i]; double mf = f(m); if(mf < af) { a = m; af = mf; } if(mf > bf) { b = m; bf = mf; } } prev = now; } printf("%.10f\n%.10f\n", a, b); } }