Expanding Lake
You’ve been walking around your garden when rain started. At first, you were feeling relieved because it was the first rain in two months. But suddenly you’ve realized that this is not just a normal rain, but the all-drowning rain the news were talking about. So now you need to get home fast.
Imagine your garden as an infinite plane. You are at point (x_0, y_0) on this plane, while your home is at point (0, 0). You can move with speed v_0. Easy:
you might think.
But there’s also a dreadful lake in your garden. It is a circle centered at (x_1, y_1) and radius r_1. Moveover, because of the rain, it is expanding with speed v_1, so its radius after time t is equal to r_1 + v_1t (its center doesn’t move).
You can’t go into the lake as you’re suddenly very afraid of water. It’s OK for you to stand on the border of the lake.
Is it possible for you to get home? If yes, what is the minimum time required to do that?
Input
The first line of the input file contains three integers x_0, y_0 and v_0.
x_0^2 + y_0^2 > 0, -1000 ≤ x_0, y_0 ≤ 1000, 1 ≤ v_0 ≤ 1000.
The second line of the input file contains four integers x_1, y_1, r_1 and v_1, x_1^2 + y_1^2 > r_1^2, -1000 ≤ x_1, y_1 ≤ 1000, 1 ≤ r_1, v_1 ≤ 1000, (x_0 - x_1)^2 + (y_0 - y_1)^2 > r_1^2.
It is guaranteed that in case it’s possible to get home, it would still be possible when the initial radius of the lake is r_1 + 10^{-3}; in case it’s impossible to get home, it would still be impossible when the initial radius of the lake is r_1 - 10^{-3}.
Output
Output one floating-point number denoting the minimum time required to get home. Your answer will be considered correct, if it’s within 10^{-9} relative or absolute error of the correct one. In case you can’t get home, output -1.