Damaged Picture#12

Damaged Picture

1 second
64 megabytes
Easy

Roman numeral , standing on the floor at the point with coordinates X_0, Y_0, 0, could not withstand the outcome of the "Roman numerals" problem and fell onto the floor. Since its lower end was hinged to the floor, it stayed in place, while the upper end moved to the point with coordinates X_1, Y_1, 0.

There is a perfectly vertical paper picture in the room. The coordinates of the ends of its lower base are X_2, Y_2, 0 and X_3, Y_3, 0. The height of the picture is .

Find the length of the "tear on the paper" caused by the Roman numeral falling onto the picture.

Input

The input consists of integers: X_0, Y_0, X_1, Y_1, X_2, Y_2, X_3, Y_3, . Each coordinate's absolute value does not exceed 10^9.

Output

Output a single real number — the required length, with a precision of .

Examples

Example 4

Loading
Loading