An ironman triathlon is a race where participants swim for $3.86$ km, ride a bicycle for $180.25$ km, and finally run a marathon, and it is considered one of the toughest sport events. Viveka has been training for an even more challenging competition: the $n$-athlon. In an $n$-athlon race, participants have to go from the starting point to the finishing point through several types of terrain: water, sand, ice, asphalt, etc. To make the race more interesting, participants are free to pick the route that they think suits best their abilities. Last year Viveka achieved an epic victory by skating the last $40$ km in $1$ hour over ice, while her arch-rival Veronica was stuck in a tar pit $1$ m from the finishing point.

The terrain distribution for this year has been published and now it is your task as the optimization expert in Viveka's team to help her figure out the best route for the race. The competition takes place in a flat area, which we model as the 2D plane, and each type of terrain is shaped as a horizontal strip. Participants are not allowed to leave the race area. You know the position of each strip and Viveka's speed in that type of terrain.