Find the distance from a given point to a specified segment.
Six numbers are given: the coordinates of the point and the coordinates of the endpoints of the segment. All input values are integers whose absolute value does not exceed .
Output a single number — the distance from the point to the segment, with a precision of at least 10^{-5}.
Example 1