#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma,tune=native")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template<class T> ostream& prnt(ostream& out, T v) { out << v.size() << '\n'; for(auto e : v) out << e << ' '; return out;}
template<class T> ostream& operator<<(ostream& out, vector <T> v) { return prnt(out, v); }
template<class T> ostream& operator<<(ostream& out, set <T> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, map <T1, T2> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, pair<T1, T2> p) { return out << '(' << p.st << ' ' << p.nd << ')'; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...);}
#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_v(x, n) do{cerr<<#x"[]: ";for(int _=0;_<n;++_)cerr<<x[_]<<" ";cerr<<'\n';}while(0)
#define dbg_ok cerr<<"OK!\n"
#define ll long long
#define ld long double
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000007
#define zeros(x) x&(x-1)^x
#define fi first
#define se second
#define Nmax 500005
const long double PI = acos(-1);

struct point{
	long long x, y;
	int ID;

	bool operator <(const point &oth) const{
		if (x == oth.x) return y < oth.y;
		return x < oth.x;
	}

	bool operator ==(const point &oth) const{
		return x == oth.x && y == oth.y;
	}
};


point fst;
struct convexHull{
	vector<point> P;
	vector<point> ans;
	bool bad = false;
	
	void add(point crt){
		bad = true;
		P.push_back(crt);
	}

	void instantiate(vector<point> &crt){
		bad = true;
		P = crt;
	}
	
	static long long det(point A, point B, point C){
		return A.x * B.y + A.y * C.x + B.x * C.y - A.x * C.y - A.y * B.x - B.y * C.x;
	}

	static long long dist(point A, point B){
		return (A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y);
	}

	static bool comp(point a, point b) {
		if (det(fst,a,b) == 0) return dist(fst,a) < dist(fst,b);
		return det(fst,a,b) < 0;
	}

	vector<point> getConvexHull(){
		if (bad){
			ans.clear();
			if (P.empty()) return ans;
			fst = P[0];
			for (auto it : P) fst = min(fst, it);

			for (auto it = P.begin(); it!=P.end(); it++){
				if (*it == fst){
					P.erase(it);
					break;
				}
			}

			sort(P.begin(), P.end(), comp);
			ans.push_back(fst);
			for (auto it : P){
				while (ans.size() >= 2 && det(ans[ans.size() - 2], ans[ans.size() - 1], it) >= 0){
					ans.pop_back();
				}
				ans.push_back(it);
			}
		}
		return ans;
	}
};
convexHull ch;

long double dist(point A, point B){
	return sqrt((long double)(A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y));
}

long double getAngle(point A, point B, point C){
	swap(A,B);
	long double a = dist(B,C);
	long double b = dist(A,C);
	long double c = dist(A,B);
	long double x = (b * b + c * c - a * a) / (2.0 * b * c);
	if (2.0 * b * c < 0.00000000001) return PI;
	dbg(x);
	return acos(x);
}

int n;
long double ans[Nmax];

int main(){
    ios::sync_with_stdio(false);
    
    cin >> n;
    for (int i=1;i<=n;i++){
    	int x,y;
    	cin >> x >> y;
    	ch.add({x,y,i});
    }
    if (n==2){
    	cout << "0.5\n0.5\n";
    	return 0;
    }

    vector<point> hull = ch.getConvexHull();
    if (hull.size()==2){
    	for (auto it : hull) ans[it.ID] = 0.5;
    	for (int i=1;i<=n;i++){
	    	cout << fixed << setprecision(9) << ans[i] << '\n';
	    }
    	return 0;
    }

    hull.push_back(hull[0]);
    for (int i=1;i+1<hull.size();i++){
    	long double a = getAngle(hull[i-1], hull[i], hull[i+1]);
    	ans[hull[i].ID] = (PI - a) / (2 * PI);
    }
    long double a = getAngle(hull[hull.size() - 2], hull[0], hull[1]);
    ans[hull[0].ID] = (PI - a) / (2 * PI);

    for (int i=1;i<=n;i++){
    	cout << fixed << setprecision(9) << ans[i] << '\n';
    }

    return 0;
}

Measured memory_bytes: 256