The Return of Superman
Is everyone familiar with Superman? If not, here's a quick introduction: he's an extraterrestrial hero who is impervious to punches and bullets. In essence, he's nearly invincible. However, there's one substance that can harm him—fragments of a green meteorite from his home planet. When these are nearby, Superman loses his superpowers.
Superman's clever foes have injured him with a bullet made of this green meteorite. Now, he is slowly dying. His only hope is to reach the Fortress, his sole link to his home planet, where they can remove the bullet and heal him.
Let's analyze this scenario on a plane. Superman was injured at point S(x_1, y_1). The Fortress is located at point F(x_2, y_2). Initially, Superman's speed is V m/s. Due to his wound, his speed decreases by A units every second. Additionally, every meter he travels further reduces his speed by B units. These speed reductions occur continuously. If his speed drops to zero, Superman can no longer move.
Adding to his challenges, there are deposits of the same green meteorite nearby (considered as a point). Depending on the quantity of the substance, they have a certain radius of effect. This radius defines the circular area where the substance's effect is felt. If the injured Superman enters this area, he will perish.
You are given x_1, y_1, x_2, y_2—Superman's starting coordinates and the Fortress's coordinates. Next, the numbers X, Y, R are provided—the coordinates of the meteorite deposits and their radius of effect. Finally, the numbers V, A, and B are given.
If Superman cannot reach the Fortress, output "-1" (without quotes). Otherwise, output the minimum time it will take him to get there.
It is guaranteed that if Superman cannot reach the Fortress, he will stop at a distance of no less than 0.000001 (1e-6) from it.
Input
The first line contains the numbers x_1, y_1, x_2, y_2. The second line contains the numbers X, Y, R. The numbers x_1, y_1, x_2, y_2, X, and Y are integers and do not exceed 50 in absolute value. The number R ranges from 1 to 50, inclusive.
The third line contains the numbers V, A, B. V, A, and B are given with two decimal places and satisfy 0 < V, A ≤ 50, 0 ≤ B ≤ 50.
Output
If the Fortress is reachable, output the minimum time it will take Superman to reach it. Your answer should not differ from the correct one by more than 0.001. If the Fortress is unreachable, output -1.