#Q18. 「一本通 1.2 练习 4」传送带

「一本通 1.2 练习 4」传送带

Description

Original Source: SCOI 2010

On a two-dimensional plane, there are two conveyor belts, each of which can be considered as a line segment. The two conveyor belts are segments AB\text{AB} and CD\text{CD} respectively. lxhgww moves at speed PP on AB\text{AB}, at speed QQ on CD\text{CD}, and at speed RR elsewhere on the plane.

Now, lxhgww wants to travel from point AA to point DD and wishes to know the minimum time required.

Input Format

The first line of input contains four integers representing the coordinates of AA and BB, namely Ax,Ay,Bx,ByA_x, A_y, B_x, B_y;

The second line contains four integers representing the coordinates of CC and DD, namely Cx,Cy,Dx,DyC_x, C_y, D_x, D_y;

The third line contains three integers, P,Q,RP, Q, R.

Output Format

The output consists of a single line, displaying the shortest time for lxhgww to travel from point AA to point DD, rounded to two decimal places.

Sample 1

0 0 0 100
100 0 100 100
2 2 1

136.60

Data Range and Hint

For 100%100\% of the data, $1 \leq A_x, A_y, B_x, B_y, C_x, C_y, D_x, D_y \leq 1000$, and 1P,Q,R101 \leq P, Q, R \leq 10.