Flight of the Hamster 3
In Hamsterburg, an annual flying hamster competition takes place. This year, the rules are as follows: A hamster is launched from a slingshot at a specific point on the ground with an initial speed V. There are several checkpoints in the air. If the hamster's flight path intersects a checkpoint, it stops there and can be launched again from that point at any angle with the initial speed V. All checkpoints are located in the same plane, perpendicular to the ground, and the starting point is also in this plane. Additionally, there are circular obstacles in the same plane. The hamster's flight path cannot pass through the interior of any circle (though it can touch the circle). The circles do not touch or cover the checkpoints and the starting point, but they can intersect with each other and partially extend underground. The hamster must reach a specified checkpoint within a certain time T, passing through other checkpoints. If the hamster can achieve this, it will earn Q points. Fewer points indicate a better flight. Suppose the hamster travels through points p_0, p_1, ..., p_k, where p_0 is the starting point and p_k is the target. If it arrives at point p_i at an angle of a_i degrees and departs at an angle of b_i, let the minimum rotation from a_i to b_i be c_i degrees in absolute value. Then, for such a flight, Q = max{c_i}. What is the minimum number of points the hamster can receive? The sizes of the hamster and slingshots, as well as air resistance, can be ignored. Assume the acceleration due to gravity is 10 m/s². According to the rules, the hamster cannot start and end a jump at the same checkpoint.
Input
The first line contains the numbers n — the number of checkpoints, m — the number of circles, V — speed (m/s), T — time (s). Then, in n lines, the coordinates of each checkpoint x, y (m) are given. The hamster must reach the checkpoint specified last. In the next m lines, the coordinates and radii of each circle x, y, r (m) are given. The starting point has coordinates (0, 0).
Constraints
1 ≤ n ≤ 100
0 ≤ m ≤ 100
1 ≤ V ≤ 100
1 ≤ T ≤ 100
100 ≤ x ≤ 100
0 ≤ y ≤ 100
1 ≤ r ≤ 100
Output
Output the minimum number of points the hamster can receive with three decimal places, or "-1" if the hamster cannot reach the checkpoint within time T.