In the year 8102, the world is divided between two superpowers: the Polyline Nation and the Curve Nation.
The Polyline Nation reveres polyline technology, with its citizens believing that polylines are the most beautiful shapes in the world, symbolizing the perfect combination of an unjust world and their own upright nature. To the people of the Curve Nation, however, this is merely a foolish idea held by a group of stubborn people. Contrary to the Polyline Nation, the Curve Nation reveres curve technology. According to the official stance of the Curve Nation, curves are the most beautiful shapes, representing their flexible thinking and this ever-changing world.
Due to their differing ideologies, friction between the two nations is constant. Beneath a seemingly peaceful sky, a new war is brewing.
The Polyline Nation has recently made a breakthrough in polygon theory. Their "poly-logicians" discovered that if a two-dimensional polygon perpendicular to the ground is thrown at high speed in the sky, it will generate a massive impact force the moment it hits the ground. Based on this theory, the Polyline Nation's military has loaded bombers with a large number of polygon bombs, preparing to launch a surprise attack on the Curve Nation.
The Curve Nation, having long been aware of the danger of war and having received intelligence from spies within the Polyline Nation, has quickly deployed air defense measures. As a senior programmer for the Curve Nation's military, you are tasked with calculating the landing point of the polygon bombs falling from the sky.
Since the polygon is perpendicular to the ground, we only need to consider this problem in the two-dimensional plane where the polygon resides. The $x$-axis represents the ground, and the $y$-axis points toward the sky, with units in meters. According to intelligence, the polygon has $n$ vertices, and the $i$-th vertex coordinate is $(x_i, y_i)$. The polygon bomb has a uniform mass. When thrown from the bomber, it has only a horizontal velocity $v\,m/s$ and an angular velocity $\omega$ around its center of mass (clockwise, in radians). As a programmer for the Curve Nation, you know well the curves of projectile motion and circular motion, and you can calculate the first landing point of the bomb with a simple calculation.
The acceleration due to gravity is $g=9.8\,m/s^2$. Ignore air resistance. It is guaranteed that the input polygon is above the ground. It is guaranteed that the input polygon is a simple polygon.
Input
The first line contains an integer $n$, representing the number of vertices of the polygon.
The second line contains two integers $v$ and $\omega$, representing the initial horizontal velocity and the angular velocity, respectively.
The next $n$ lines each contain two integers $x_i$ and $y_i$, representing the coordinates of the polygon vertices. The polygon vertex coordinates are given in counter-clockwise order.
Output
Output a single line containing a real number $x$, representing the horizontal coordinate of the first point where the polygon touches the ground.
Examples
Input 1
4
1 1
1 2
2 2
2 3
1 3
Output 1
2.23241417
Note
The answer is considered correct if the relative or absolute error is within $10^{-4}$.
The data guarantees that the first landing point is unique.
The coordinates of the bomb's center of mass are the average of all vertex coordinates.
Subtasks
- Task 1 (10): $3 \leq n\leq 2\,000$, $\omega=0$, $0 \leq v \leq 1000$, $0 < x_i, y_i \leq 10^5$
- Task 2 (30): $3 \leq n\leq 200$, $0 \leq \omega \leq 100$, $0 \leq v \leq 1000$, $0 < x_i, y_i \leq 10^5$
- Task 3 (60): $3 \leq n\leq 2\,000$, $0 \leq v,\omega \leq 1000$, $0 < x_i, y_i \leq 10^5$