#P2571. [SCOI2010] 传送带

[SCOI2010] 传送带

Description

In a 22-dimensional plane, there are two conveyor belts, each of which can be regarded as a line segment. The two conveyor belts are line segment AB\text{AB} and line segment CD\text{CD}. lxhgww moves at speed PP on AB\text{AB}, at speed QQ on CD\text{CD}, and at speed RR on the plane. Now lxhgww wants to go from point A\text{A} to point D\text{D}, and he wants to know the minimum time required.

Input Format

The first line contains 44 integers, giving the coordinates of A\text{A} and B\text{B}, namely AxA_x, AyA_y, BxB_x, ByB_y.

The second line contains 44 integers, giving the coordinates of C\text{C} and D\text{D}, namely CxC_x, CyC_y, DxD_x, DyD_y.

The third line contains 33 integers, which are PP, QQ, and RR.

Output Format

Output one line, the minimum time for lxhgww to go from point A\text{A} to point D\text{D}, rounded to 22 decimal places.

0 0 0 100
100 0 100 100
2 2 1

136.60

Hint

For 100%100\% of the testdata, $1 \le A_x, A_y, B_x, B_y, C_x, C_y, D_x, D_y \le 10^3$, 1P,Q,R101 \le P, Q, R \le 10.

Translated by ChatGPT 5