#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 1000;

const double DELTA = 1e-4;
const double DELTA2 = 1e-8;
const double PI = acos(-1);
const double PI2 = PI * 2;

/* typedef */

template <typename T>
struct Pt {
  T x, y;

  Pt() {}
  Pt(T _x, T _y) : x(_x), y(_y) {}
  Pt(const Pt& pt) : x(pt.x), y(pt.y) {}

  bool operator==(const Pt pt) const { return x == pt.x && y == pt.y; }
  Pt<T> operator+(const Pt pt) const { return Pt<T>(x + pt.x, y + pt.y); }
  Pt<T> operator-() const { return Pt<T>(-x, -y); }
  Pt<T> operator-(const Pt pt) const { return Pt<T>(x - pt.x, y - pt.y); }
  Pt<T> operator*(T t) const { return Pt<T>(x * t, y * t); }
  Pt<T> operator/(T t) const { return Pt<T>(x / t, y / t); }
  T dot(Pt v) const { return x * v.x + y * v.y; }
  T cross(Pt v) const { return x * v.y - y * v.x; }
  Pt<T> mid(const Pt pt) { return Pt<T>((x + pt.x) / 2, (y + pt.y) / 2); }
  T d2() { return x * x + y * y; }
  double d() { return sqrt(d2()); }

  Pt<T> rot(double th) {
    double c = cos(th), s = sin(th);
    return Pt<T>(c * x - s * y, s * x + c * y);
  }

  bool operator<(const Pt& pt) const {
    return x < pt.x || (x == pt.x && y < pt.y);
  }

  void print(string format) {
    printf(("(" + format + ", " + format + ")\n").c_str(), x, y);
  }
  void print() { print("%.6lf"); }
};

typedef Pt<double> pt;

/* global variables */

int n;
pt pts[2][MAX_N], rpts[MAX_N];

/* subroutines */

bool pt_comp(const pt& pt0, const pt& pt1) {
  double dx = pt0.x - pt1.x, dy = pt0.y - pt1.y;
  return (dx <= -DELTA) || (dx < DELTA && dy <= -DELTA);
}

/* main */

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

    for (int j = 0; j < 2; j++) {
      pt ctr(0.0, 0.0);
      for (int i = 0; i < n; i++) {
	cin >> pts[j][i].x >> pts[j][i].y;
	ctr = ctr + pts[j][i];
      }
      ctr = ctr / n;
      //ctr.print();

      for (int i = 0; i < n; i++)
	pts[j][i] = pts[j][i] - ctr;
    }

    pt *pts0 = pts[0], *pts1 = pts[1];
    double min_th = 10;

    pt& pto = pts0[0];
    double tho = atan2(pto.y, pto.x);
    double d2o = pto.d2();

    for (int i = 0; i < n; i++) {
      pt& pti = pts1[i];
      double d2i = pti.d2();
      if (abs(d2i - d2o) < DELTA2) {
	double thi = atan2(pti.y, pti.x);
	double dth = thi - tho;
	if (dth > PI) dth -= PI2;
	else if (dth < -PI) dth += PI2;

	double adth = abs(dth);
	if (min_th <= adth) continue;
	//cout << dth << endl;

	double cdth = cos(dth), sdth = sin(dth);
	for (int j = 0; j < n; j++) {
	  rpts[j].x = cdth * pts0[j].x - sdth * pts0[j].y;
	  rpts[j].y = sdth * pts0[j].x + cdth * pts0[j].y;
	}
	sort(rpts, rpts + n, pt_comp);

	bool found = true;
	for (int j = 0; j < n; j++)
	  if (! binary_search(rpts, rpts + n, pts1[j], pt_comp)) {
	    found = false;
	    break;
	  }

	if (found) min_th = adth;
      }
    }

    printf("%.10lf\n", min_th);
  }

  return 0;
}