There are infinitely many bamboo stalks in the Lost Bamboo Forest. Youmu wishes to use the Roukanken to cut down some bamboo for cooking.
To simplify the problem, consider a two-dimensional plane where the bamboo stalks can be viewed as $+\infty$ straight lines, with equal spacing between adjacent stalks. Each bamboo stalk has the same inclination (i.e., the angle with the $x$-axis). The range of Youmu's slash can be viewed as a simple polygon.
Youmu will use the Roukanken to cut the bamboo along the edges of the simple polygon; all bamboo stalks located inside the polygon will fall and be collected by Youmu.
Now, Youmu wants to know the total length of the bamboo she has cut down.
Input
The first line contains an integer $n$ ($1 \le n \le 10^5$), representing the number of vertices of the polygon. The next $n$ lines each contain two real numbers $x_i, y_i$ ($0 \le |x_i|, |y_i| \le 10^4$), giving the coordinates of each point in clockwise order.
The last line contains two real numbers $\theta, a$ ($\theta \in [1, 179)$, $a \in [0.1, 100]$) describing the parameters of the bamboo forest.
All real numbers in the input are given to four decimal places. Additionally, it is guaranteed that the angle between any edge of the polygon and the $x$-axis is not $\theta$.
Output
Output a single real number representing the total length of the bamboo cut down.
Your answer $ans$ is considered correct if and only if it satisfies $\frac{|ans - std|}{\max(1.0, std)} \le 10^{-6}$ compared to the standard answer $std$.
Examples
Input 1
4 2.0000 2.0000 2.0000 -2.0000 -2.0000 -2.0000 -2.0000 2.0000 45.0000 1.0000
Output 1
22.6274169980
Input 2
8 0.0000 2.5000 1.0000 1.5000 2.5000 1.0000 2.0000 -1.0000 1.0000 -2.0000 -2.0000 -2.0000 -2.5000 1.0000 -1.0000 2.0000 60.0000 0.8000
Output 2
23.1662217484
Note
For Example 1, it is easy to see that the total length of the bamboo (the total length of the orange line segments) is $16\sqrt{2}$.
For Example 2, I have a truly marvelous explanation for this example, but the margin here is too small to contain it.