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 PyPy3 (2.4.0) (judge verdict: Runtime Error)

from math import acos, hypot, pi


class Point:
    def __init__(self, i, x, y):
        self.i = i
        self.x = int(x)
        self.y = int(y)


class Line:
    def __init__(self, p1, p2):
        self.p1 = p1
        self.p2 = p2
        self.d2 = (p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2
        if p1.x == p2.x:
            self.a = 1
            self.b = 0
        else:
            self.a = p2.y - p1.y
            self.b = p1.x - p2.x
        self.c = -p1.y * self.b - p1.x * self.a

    def dist(self, p):
        f = self.a * p.x + self.b * p.y + self.c
        if f == 0:
            d12 = (self.p1.x - p.x) ** 2 + (self.p1.y - p.y) ** 2
            d22 = (self.p2.x - p.x) ** 2 + (self.p2.y - p.y) ** 2
            if self.d2 < max(d12, d22):
                return None
            return 0
        if f < 0:
            return -1
        else:
            return 1

    def kaku(self, other):
        x = self.a * other.a + self.b * other.b
        x /= hypot(self.a, self.b) * hypot(other.a, other.b)
        return pi - acos(x)


def make_p(n, pp):
    pids = {p.i: [] for p in pp}
    for i in range(n):
        if len(pids[i]) == 2:
            continue
        p1 = pp[i]
        for j in pids:
            if i == j or len(pids[j]) == 2:
                continue
            p2 = pp[j]
            line = Line(p1, p2)
            ptype = {0: 0, 1: 0, -1: 0, None: 0}
            for k in pids:
                if k == i or k == j:
                    continue
                ptype[line.dist(pp[k])] += 1
            if ptype[None]:
                continue
            if ptype[1] == 0 or ptype[-1] == 0:
                pids[i].append(j)
                pids[j].append(i)
    return pids


def main():
    n = int(input())
    if n == 2:
        print(0.5)
        print(0.5)
        return
    pp = []
    for i in range(n):
        p = Point(i, *input().split())
        pp.append(p)
    pids = make_p(n, pp)
    prob = [0.0] * n
    for i, nei in pids.items():
        if len(nei) == 2:
            l1 = Line(pp[i], pp[nei[0]])
            l2 = Line(pp[i], pp[nei[1]])
            kaku = l1.kaku(l2)
            prob[i] += kaku / (2 * pi)
    for p in prob:
        print(p)


if __name__ == '__main__':
    main()