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)

// fest
#include <bits/stdc++.h>	

#define pb push_back
#define F first
#define S second
#define y1 dasdasfasfas
#define x1 wqdadfasfasfas
#define All(c) c.begin(), c.end()
#define SZ(A) (int((A).size()))
#define umap unordered_map
#define FILENAME ""
#define __ fflush(stdout)

typedef long long ll;
typedef long double ld;    

using namespace std;

void FREOPEN() {
	#ifdef COMP
		freopen(".in", "r", stdin);
		freopen("1.out", "w", stdout);
	#else
		freopen(FILENAME".in", "r", stdin);
		freopen(FILENAME".out", "w", stdout);
	#endif
}                           

inline double Time() {return (clock() * 1.0) / CLOCKS_PER_SEC; }             

const int N = 200500, inf = 1e9 * 2, MOD = (int)1e9 + 7;

char CH[N];

const ll INF = 1e18;

const int dx[] = {1, -1, 0, 0, -1, 1, -1, 1};
const int dy[] = {0, 0, 1, -1, -1, 1, 1, -1};

int x[N], y[N], ans[N];

ll dist(int xx, int yy, int xxx, int yyy) {
	return (xxx - xx) * 1ll * (xxx - xx) + (yyy - yy) * 1ll * (yyy - yy);
}

int main() {
  
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
	double all = 8e6;
	for (int xx = -1e6; xx <= 1e6; xx++) {
		int yy = -1e6;
		int pos = 1;
		for (int i = 2; i <= n; i++) {
			if (dist(x[i], y[i], xx, yy) < dist(x[pos], y[pos], xx, yy)) pos = i;
		}
		ans[pos]++;
		yy = 1e6;
		pos = 1;
		for (int i = 2; i <= n; i++) {
			if (dist(x[i], y[i], xx, yy) < dist(x[pos], y[pos], xx, yy)) pos = i;
		}
		ans[pos]++;
	}
	for (int yy = -1e6; yy <= 1e6; yy++) {
		int xx = -1e6;
		int pos = 1;
		for (int i = 2; i <= n; i++) {
			if (dist(x[i], y[i], xx, yy) < dist(x[pos], y[pos], xx, yy)) pos = i;
		}
		ans[pos]++;
		xx = 1e6;
		pos = 1;
		for (int i = 2; i <= n; i++) {
			if (dist(x[i], y[i], xx, yy) < dist(x[pos], y[pos], xx, yy)) pos = i;
		}
		ans[pos]++;
	}
	for (int i = 1; i <= n; i++) printf("%.5lf\n", (double)ans[i] / all);
	return 0;	
}