Return of the Jedi

Time limit1sMemory limit128 MB

Problem

Luke Skywalker races through the forest on a speeder bike, trying to outrun a patrol of Imperial scouts on the forest moon of Endor. The moon is covered by dense foliage and a thick forest of ancient, towering trees. The speeder bike is an antigravity vehicle that moves at a constant speed of 200 miles per hour, and Luke wants to reach Princess Leia in the Ewok village as quickly as possible.

Model the forest as a plane containing $T$ trees. Each tree is a circular obstacle, and Luke may not pass through the interior of any tree, so his route must curve around them. Luke starts at $(x_{luke}, y_{luke})$ and the Ewok village is at $(x_{ewok}, y_{ewok})$. Find the shortest possible travel time from Luke's starting position to the Ewok village.

Input

The first line contains five numbers: the integer $T$ followed by $x_{luke}$, $y_{luke}$, $x_{ewok}$, and $y_{ewok}$.

Each of the next $T$ lines describes one tree with three numbers: its center $x_{tree}$, $y_{tree}$ and its diameter $d_{tree}$.

$T$ is an integer that is at most $10$. All coordinates and diameters are real numbers measured in miles. No two trees intersect or touch each other, and neither Luke's start nor the Ewok village lies inside a tree.

Output

Print a single real number: the minimum travel time in seconds, rounded to exactly two decimal places.