Jogging

No attempts yetTime limit1sMemory limit512 MB

Problem

It is Sunday, November 1, 2390, and Eddy has just been elected to the World Council. The work is interesting and carries real responsibility, and Eddy wants to throw himself into it, but there is a problem. Eddy loves sport. He likes jogging most of all, and since he was a little boy he has jogged at least thirty minutes every single day. As a councillor he will have even less free time than he had as a teacher. Where will the time for jogging come from?

Eddy decided to jog on his way to work. The Council building is far from his house, so he wants to combine jogging with public transport. Moving pathways are the only public transport in the Capital. One line of pathways is a pair of straight pathways running in opposite directions at the same speed v1>0v_1 > 0. The pathways are very long and narrow, so this problem treats each pair as one infinite straight line in the plane. Every line also comes with two numbers Ti+T_i^{+} and TiT_i^{-}, the time needed to board that line and the time needed to leave it. Crossing a pathway on foot costs no extra time. Changing from line ii to line jj at the point where the two meet takes exactly Ti+Tj+T_i^{-} + T_j^{+} seconds. The two lines do not really intersect there, because special bridges are built at those points.

Eddy wants to jog on the pathways as well, so on a pathway he moves with ground speed v1+v2v_1 + v_2, where v2>0v_2 > 0 is his speed when jogging on still ground.

Find the smallest travel time from Eddy's house to the Council building. A route is made of several straight segments, and some of them can lie on one of the existing pathways.

Input

The first line contains one integer NN, the number of pairs of moving pathways in the city (0N500 \le N \le 50).

The second line contains six real numbers x1x_1, y1y_1, x2x_2, y2y_2, v1v_1, v2v_2 separated by spaces: the coordinates of Eddy's house, the coordinates of the Council building, the speed of the pathways, and Eddy's own speed.

Each of the next NN lines describes one line of pathways with six real numbers xi1x_{i1}, yi1y_{i1}, xi2x_{i2}, yi2y_{i2}, Ti+T_i^{+}, TiT_i^{-}. The points (xi1,yi1)(x_{i1}, y_{i1}) and (xi2,yi2)(x_{i2}, y_{i2}) are two different points on that line, and Ti+T_i^{+} and TiT_i^{-} are the boarding and the leaving time (0Ti+,Ti100 \le T_i^{+}, T_i^{-} \le 10).

No coordinate exceeds 1000010000 in absolute value, and v1v_1 and v2v_2 are real numbers between 11 and 100100. All pathways lie on different straight lines. Neither (x1,y1)(x_1, y_1) nor (x2,y2)(x_2, y_2) lies on any pathway.

Output

Print the smallest travel time from the house to the Council building, rounded to six digits after the decimal point, with all six digits written out.