#include <iostream>
#include <vector>
#include <array>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <tuple>
#include <bitset>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>
struct Point {
	double x, y;
	struct Vector operator-(const Point& that) const;
	double distance_from(const Point& that) const;
};
struct Vector {
	double dx, dy;
	double dot(const Vector& that) const;
	double cross(const Vector& that)const;
	double length() const;
	struct Angle to_angle() const;
	struct Angle angle_with(const Vector& that) const;
	Vector rotate(const struct Angle& angle) const;
	Vector operator-(const Vector& that) const;
};
struct Angle {
	double sin, cos;
	double to_radian() const;
	Angle operator-() const;
};
int main() {
	std::vector<double> result;
	while (true) {
		int n; std::cin >> n; if (n == 0) break;
		std::vector<Point> before_points(n), after_points(n);
		for (auto& point : before_points) std::cin >> point.x >> point.y;
		for (auto& point : after_points) std::cin >> point.x >> point.y;
		if (n == 1) {
			//std::cout << 0 << '\n';
			result.push_back(0);
			continue;
		}
		const auto origin = *std::min_element(before_points.begin(), before_points.end(), [](const Point& a, const Point& b) {return (a.y != b.y) ? a.y < b.y : a.x < b.x; });
		std::vector<Vector> before_vec; before_vec.reserve(n - 1);
		for (const auto& point : before_points) {
			if (origin.distance_from(point) > 1e-9) before_vec.push_back(point - origin);
		}
		const auto base = *std::max_element(before_vec.begin(), before_vec.end(), [](const Vector& a, const Vector& b) {return std::abs(a.cross(b)) <= 1e-9 ? a.length() < b.length() : a.cross(b) < 0; });
		const auto angle = base.to_angle();
		for (auto& vec : before_vec) vec = vec.rotate(-angle); 
		std::sort(before_vec.begin(), before_vec.end(), [base](const Vector& a, const Vector& b) { return std::abs(a.cross(b)) < 1e-12 ? a.length() < b.length() : a.cross(b) < 0; });
		double min_radian = DBL_MAX;
		for (auto i = 0; i < n; ++i) {
			std::vector<Vector> after_mapped; after_mapped.reserve(n - 1);
			for (auto j = 0; j < n; ++j) if (i != j) after_mapped.push_back(after_points[j] - after_points[i]);
			const auto new_base = *std::max_element(after_mapped.begin(), after_mapped.end(), [](const Vector& a, const Vector& b) {return std::abs(a.cross(b)) <= 1e-9 ? a.length() < b.length() : a.cross(b) < 0; });
			const auto new_angle = new_base.to_angle();
			for (auto& vec : after_mapped) vec = vec.rotate(-new_angle);
			if (std::any_of(after_mapped.begin(), after_mapped.end(), [](const Vector& a) {return a.dy < -1e-9; }))
				continue;
			std::sort(after_mapped.begin(), after_mapped.end(), [](const Vector& a, const Vector& b) { return std::abs(a.cross(b)) < 1e-12 ? a.length() < b.length() : a.cross(b) < 0; });
			bool is_match = true;
			for (auto j = 0; j < n - 1; ++j) {
				if ((after_mapped[j] - before_vec[j]).length() > 1e-6) {
					is_match = false;
					break;
				}
			}
			if (is_match) {
				min_radian = std::min(min_radian, std::acos(base.angle_with(new_base).cos));
			}
		}
		//std::cout << std::setprecision(15) << std::fixed << min_radian << '\n';
		result.push_back(min_radian);
	}
	for (const auto r : result) {
		std::cout << std::setprecision(10) << std::fixed << r << '\n';
	}
}


Vector Point::operator-(const Point& that) const
{
	return Vector{ x - that.x, y - that.y };
}

double Point::distance_from(const Point& that) const
{
	return (*this - that).length();
}

double Vector::dot(const Vector& that) const
{
	return dx * that.dx + dy * that.dy;
}

double Vector::cross(const Vector& that) const
{
	return dx * that.dy - dy * that.dx;
}

double Vector::length() const
{
	return std::sqrt(dx * dx + dy * dy);
}

Angle Vector::to_angle() const
{
	const auto len = length();
	return Angle{ dy / len, dx / len };
}

Angle Vector::angle_with(const Vector& that) const
{
	const auto len = length() * that.length();
	return Angle{ cross(that) / len, dot(that) / len };
}

Vector Vector::rotate(const Angle& angle) const
{
	return Vector{ dx * angle.cos - dy * angle.sin, dy * angle.cos + dx * angle.sin };
}

Vector Vector::operator-(const Vector& that) const
{
	return Vector{ dx - that.dx, dy - that.dy };
}

double Angle::to_radian() const
{
	return (sin >= 0) ? std::acos(cos) : std::acos(-1) * 2 - std::acos(cos);
}

Angle Angle::operator-() const
{
	return Angle{ -sin, cos };
}


Measured memory_bytes: 3460