#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const double EPS = 1.0e-7;
const double PI = acos(-1.0);

class Point
{
public:
    double y, x;
    Point(){
        y = x = 0.0;
    }
    Point(double y0, double x0){
        y = y0;
        x = x0;
    }
    Point operator+(const Point& p) const{
        return Point(y + p.y, x + p.x);
    }
    Point operator-(const Point& p) const{
        return Point(y - p.y, x - p.x);
    }
    Point operator*(double a) const{
        return Point(y * a, x * a);
    }
    Point operator/(double a) const{
        return Point(y / a, x / a);
    }
    double length() const{
        return sqrt(y * y + x * x);
    }
    double dist(const Point& p) const{
        return sqrt(pow(y - p.y, 2) + pow(x - p.x, 2));
    }
    double dot(const Point& p) const{
        return y * p.y + x * p.x; // |a|*|b|*cosθ
    }
    double cross(const Point& p) const{
        return x * p.y - y * p.x; // |a|*|b|*sinθ
    }

    double angle() const{
        return atan2(y, x);
    }
    Point rotate(double theta) const{
        return Point(sin(theta) * x + cos(theta) * y, cos(theta) * x - sin(theta) * y);
    }
    bool operator==(const Point& p) const{
        return abs(y - p.y) < EPS && abs(x - p.x) < EPS;
    }
    bool operator<(const Point& p) const{
        return y < p.y - EPS || (y < p.y + EPS && x < p.x - EPS);
    }
};

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        vector<Point> p1(n), p2(n);
        for(int i=0; i<n; ++i)
            cin >> p1[i].x >> p1[i].y;
        for(int i=0; i<n; ++i)
            cin >> p2[i].x >> p2[i].y;

        // 原点が重心となるように平行移動
        Point center(0, 0);
        for(int i=0; i<n; ++i)
            center = center + p1[i];
        center = center / n;
        for(int i=0; i<n; ++i)
            p1[i] = p1[i] - center;
        sort(p1.begin(), p1.end());

        center = Point(0, 0);
        for(int i=0; i<n; ++i)
            center = center + p2[i];
        center = center / n;
        for(int i=0; i<n; ++i)
            p2[i] = p2[i] - center;

        // p1[0] と p2[i] が重なるように回転
        double ret = DBL_MAX;
        for(int i=0; i<n; ++i){
            double theta = p1[0].angle() - p2[i].angle();
            if(theta < 0)
                theta += 2 * PI;
            if(theta > 2*PI)
                theta -= 2 * PI;

            vector<Point> p3(n);
            for(int j=0; j<n; ++j)
                p3[j] = p2[j].rotate(theta);
            sort(p3.begin(), p3.end());

            if(p1 == p3)
                ret = min(ret, min(theta, 2*PI - theta));
        }

        printf("%.10f\n", ret);
    }
}