The distance between the segments#2140

The distance between the segments

1 second
64 megabytes
Easy

Find the distance between two segments.

Input

Eight integers — the coordinates of the four endpoints of two segments. All input data are integers whose absolute values do not exceed .

Output

One number — the distance between the segments, with an accuracy of at least 10^{-6}.

Examples

Example 1

Loading
Loading