The Hierophant and The High Priestess are fascinated by the mysteries of the universe. To explore some of these mysteries on Earth — apparently a part of the universe, they used a strange wheel to study the effect of gravity on random processes.
The wheel is a convex polygon, divided into several triangular regions by lines connecting the center of rotation to each vertex, with each triangular region representing a prize. After spinning the wheel, the prize is determined by the region directly below the stopping position. An unbiased wheel has its center of rotation at its centroid, making the final winning position dependent solely on the angle occupied by each region. Unfortunately, the wheel here may be biased: when the center of rotation is not at the centroid, the result of the wheel is always directed from the center of rotation to the centroid.
Clearly, a biased wheel is boring. To make various wheels meaningful, The Hierophant decided to perturb the result in the following way: placing a small magnetic weight at a uniformly random position within the wheel's area (considered as a point mass located inside the convex polygon) will change the centroid, thus affecting the result.
The first sample: the case without a magnet, and a possible case where the magnet changes the result. The mass of the magnet is $$$w$$$, and the mass per unit area of the wheel is uniformly $$$1$$$. The High Priestess wants to know the probability that each region becomes the final winning region after the aforementioned perturbation.
It can be shown that the set of configurations where the wheel fails to uniquely determine the winning region (e.g., the center of rotation coincides with the centroid or lies on the boundary) has measure $$$0$$$, so you can safely ignore such cases.
The first line contains two integers $$$n, w ~(3 \leq n \leq 100000, 1 \leq w \leq 10^9)$$$, representing the number of vertices of the wheel and the mass of the magnet.
The next $$$n$$$ lines each contain two integers $$$x_i, y_i ~ (|x_i|, |y_i| \leq 30000)$$$, representing the coordinates of the $$$i$$$-th vertex of the wheel, given in counterclockwise order along the boundary.
The last line contains two integers $$$O_x, O_y ~ (|O_x|, |O_y| \leq 30000)$$$, representing the coordinates of the center of rotation, which is strictly inside the convex polygon.
The vertices of the wheel are all distinct, but three points may be collinear: it is guaranteed that when three adjacent points $$$u, v = (u \bmod n) + 1, w = (v \bmod n) + 1$$$ are collinear, point $$$v$$$ is strictly on the segment connecting $$$u$$$ and $$$w$$$, which ensures that all interior angles are within the range $$$(0, \pi]$$$.
It is guaranteed that the area $$$S$$$ of the wheel satisfies: $$$\max \left\{ \frac S w, \frac w S \right\} \leq 1000$$$.
Output $$$n$$$ lines, each containing a real number $$$p_i$$$, representing the probability that the region bounded by the line connecting the $$$i$$$-th vertex and the $$$(i \bmod n) + 1$$$-th vertex is the final winning region. The answer will be considered correct if it has an absolute or relative error not exceeding $$$10^{-6}$$$.
5 51 03 04 22 40 22 2
0.313777778 0.235555556 0.107555556 0.107555556 0.235555556
8 80 01 02 02 12 21 20 20 11 1
0.125000000 0.125000000 0.125000000 0.125000000 0.125000000 0.125000000 0.125000000 0.125000000
3 3-1 -101 -100 10 0
1.000000000 0.000000000 0.000000000
4 36000000-30000 -3000030000 -3000030000 30000-30000 300001 0
0.249998611 0.248327778 0.249998611 0.251675000
4 25005 05 50 50 01 1
0.402977500 0.402977500 0.097022500 0.097022500