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: Runtime Error)

#include<bits/stdc++.h>
using namespace std;

#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << (x) << endl
using vint=vector<int>;
using vvint=vector<vint>;
using pint=pair<int, int>;
using vpint=vector<pint>;
template<typename T> using priority_queue_rev=priority_queue<T, vector<T>, greater<T>>;
constexpr double pi = 3.1415926535897932384626433832795028L;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int gcd(int a, int b) {
    while (b) { swap(a %= b, b); }
    return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<typename T> void fin(T mes) {
    cout << mes << endl;
    exit(0);
}
template<typename T1, typename T2> bool chmax(T1 &a, const T2 &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> bool chmin(T1 &a, const T2 &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &rhs) {
    os << "(" << rhs.first << ", " << rhs.second << ")";
    return os;
}
template<typename T> ostream &operator<<(ostream &os, const vector<T> &rhs) {
    os << "{";
    for (auto itr = rhs.begin(); itr != rhs.end(); itr++) {
        os << *itr << (next(itr) != rhs.end() ? ", " : "");
    }
    os << "}";
    return os;
}
struct setup {
    static constexpr int PREC = 20;
    setup() {
        cout << fixed << setprecision(PREC);
        cerr << fixed << setprecision(PREC);
    };
} setup;

int N;
int x[110], y[110];
signed main() {
    cin >> N;
    rep(i, N) { cin >> x[i] >> y[i]; }
    if (N == 2) {
        cout << 0.5 << endl << 0.5 << endl;
        return 0;
    }
    rep(i, N) {
        double max_theta = 0;
        int a, b;
        rep(j, N) {
            if (i == j) { continue; }
            double vx0 = x[j] - x[i], vy0 = y[j] - y[i];
            rep(k, N) {
                if (i == k) { continue; }
                double vx1 = x[k] - x[i], vy1 = y[k] - y[i];
                double prod = vx0 * vx1 + vy0 * vy1;
                //dump(prod);
                double cos = prod / sqrt((vx0 * vx0 + vy0 * vy0) * (vx1 * vx1 + vy1 * vy1));
                double theta = acos(cos);
                if (max_theta < theta) {
                    max_theta = theta;
                    a = j, b = k;
                }
            }
        }
        double vxa = x[a] - x[i], vya = y[a] - y[i];
        double vxb = x[b] - x[i], vyb = y[b] - y[i];
        rep(c, N) {
            if (i == c) { continue; }
            double vxc = x[c] - x[i], vyc = y[c] - y[i];
            double prod0 = vxa * vxc + vya * vyc;
            double prod1 = vxb * vxc + vyb * vyc;
            double cos0 = prod0 / sqrt((vxa * vxa + vya * vya) * (vxc * vxc + vyc * vyc));
            double cos1 = prod1 / sqrt((vxb * vxb + vyb * vyb) * (vxc * vxc + vyc * vyc));
            double theta0 = acos(cos0);
            double theta1 = acos(cos1);
            if (theta0 + theta1 > pi) {
                cout << 0.0 << endl;
                goto label;
            }
        }
        cout << (pi - max_theta) / (2 * pi) << endl;
        label:;
    }
}