Problem:
Score : 600 points

Problem Statement

There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i).

Let R=10^{10^{10^{10}}}. Ringo performs the following operation:

Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smallest Euclidean distance from the point, and fall into that hole. If there are multiple such holes, the hole with the smallest index will be chosen.

For every i (1 \leq i \leq N), find the probability that Snuke falls into the i-th hole.

Here, the operation of randomly choosing a point from the interior of a circle of radius R is defined as follows:

Pick two real numbers x and y independently according to uniform distribution on [-R,R].

If x^2+y^2\leq R^2, the point (x,y) is chosen. Otherwise, repeat picking the real numbers x,y until the condition is met.

Constraints

2 \leq N \leq 100

|x_i|,|y_i| \leq 10^6(1\leq i\leq N)

All given points are pairwise distinct.

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
x_1 y_1
:
x_N y_N

Output

Print N real numbers. The i-th real number must represent the probability that Snuke falls into the i-th hole.

The output will be judged correct when, for all output values, the absolute or relative error is at most 10^{-5}.

Sample Input 1

2
0 0
1 1

Sample Output 1

0.5
0.5

If Ringo put Snuke in the region x+y\leq 1, Snuke will fall into the first hole. The probability of this happening is very close to 0.5.
Otherwise, Snuke will fall into the second hole, the probability of which happening is also very close to 0.5.

Sample Input 2

5
0 0
2 8
4 5
2 6
3 10

Sample Output 2

0.43160120892732328768
0.03480224363653196956
0.13880483535586193855
0.00000000000000000000
0.39479171208028279727

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <bits/stdc++.h>
#define R register
#define MN 105
typedef double db;
#define double long double
const double pi = acos(-1);
typedef long long ll;
inline int read(){
	R int x; R bool f; R char c;
	for (f=0; (c=getchar())<'0'||c>'9'; f=c=='-');
	for (x=c^'0'; (c=getchar())>='0'&&c<='9'; x=(x<<1)+(x<<3)+(c^'0'));
	return f?-x:x;
}
struct P{
	int x,y,no;
	inline P operator - (const P &b)const{return (P){x-b.x,y-b.y};}
	inline ll operator * (const P &b)const{return (ll)x*b.x+(ll)y*b.y;}
	inline ll operator / (const P &b)const{return (ll)x*b.y-(ll)y*b.x;}
	inline bool operator <(const P &b)const{return b.x==x?y<b.y:x<b.x;}
	inline double mod(){return sqrt((ll)x*x+(ll)y*y);}
	inline ll mod2(){return (ll)x*x+(ll)y*y;}
}pt[MN];int n,tp,que[MN];double ans[MN];
inline bool cmp(P a,P b){return (a-pt[1])/(b-pt[1])?(a-pt[1])/(b-pt[1])>0:(a-pt[1]).mod2()<(b-pt[1]).mod2();}
inline double angle(P a,P b,P c){return acos((b-a)*(c-a)/(b-a).mod()/(c-a).mod());}
int main(){
	n=read();for (R int i=1; i<=n; ++i) pt[i]=(P){read(),read(),i},pt[i]<pt[1]?std::swap(pt[i],pt[1]),0:0;
	std::sort(pt+2,pt+n+1,cmp);for (R int i=1; i<=n; que[++tp]=i++)
		while(tp>1&&(pt[que[tp]]-pt[que[tp-1]])/(pt[i]-pt[que[tp-1]])<=0) --tp;
	ans[pt[que[1]].no]=(pi-angle(pt[que[1]],pt[que[2]],pt[que[tp]]))/(pi*2);
	ans[pt[que[tp]].no]=(pi-angle(pt[que[tp]],pt[que[tp-1]],pt[que[1]]))/(pi*2);
	for (R int i=2; i<tp; ++i)
		ans[pt[que[i]].no]=(pi-angle(pt[que[i]],pt[que[i-1]],pt[que[i+1]]))/(pi*2);
	for (R int i=1; i<=n; ++i) printf("%.10lf\n",(db)(ans[i]));
	return 0;
}