401734: GYM100519 F Friends
Description
Three friends Alex, Dmitry and Petr want to go abroad for a better life. They start at 09:00 in the morning in their home city A and want to be in the foreign city B as soon as possible.
Alex wants to start immediately and decided to use a car and a highway. He has to drive directly to the customs point C, then spends D minutes there to pass the customs, and then drives directly to the city B. He drives the car with a speed of V kilometers per hour.
Dmitry has bought an airplane ticket. His plane departs at time T from the city A and flies for some time F directly to the city B.
Petr felt adventurous, so he decided to take his neighbor's tractor and drive straight to the city B with a speed of W kilometers per hour. If Petr's path lies through the customs point C, he spends D minutes there to pass the customs too. Otherwise, he does not stop during the whole trip.
Now they wonder who will be the first in the city B and can cook a welcoming dinner for all of them. We assume that friends live on a plane, and the distance between points is the common Euclidean distance.
InputThe first line of input contains six integers XA, YA, XB, YB, XC and YC, the coordinates in kilometers of cities A and B and the customs point C respectively (0 ≤ XA, YA, XB, YB, XC, YC ≤ 1000). It is guaranteed that the customs point C is closer to A than the city B and closer to B than the city A.
The second line contains two integers D and V, the time to pass the customs in minutes and the speed of Alex's car in kilometers per hour respectively (0 ≤ D ≤ 1000, 40 ≤ V ≤ 100).
The third line contains the departure time T and the duration F of Dmitry's flight, both in the format "HH:MM". It is guaranteed that the departure time is correct, later than 09:00 and earlier than 24:00. The flight duration is greater than 00:00 and less than 24:00.
The fourth line contains one integer W, the speed of Petr's tractor in kilometers per hour (10 ≤ W ≤ 50).
OutputOutput the name of the first friend in the city B. It is guaranteed that the absolute difference between arrival times for each pair of friends will be at least one second.
ExamplesInput0 0 10 0 5 5Output
60 100
10:00 00:05
10
PetrInput
0 0 100 0 50 50Output
0 100
09:01 02:10
50
AlexInput
0 0 1000 0 500 500Output
0 100
10:00 02:10
33
Dmitry