eolymp
Problems

The distance between the segments

The distance between the segments

Finddistancebetweentwo segments.

Input

Eightof integers-the coordinates ofthe fourends of twosegments.Allinput dataare integersnotexceedingmodulo10000.

Output

Onenumber-the distancebetweenthe segmentswithan accuracy ofless than10-6.

Time limit 1 second
Memory limit 64 MiB
Input example #1
1 1 2 2 2 1 3 0
Output example #1
0.70710678118654752