Robot
Robot to go on a plane from point A to point B. Walk a straight line is not always possible because of the obstacles. Need to write a program that computes the minimum path length of the robot from point A to point B. We assume the size of the robot is negligibly small compared to overcame distance and size of obstacles. We assume that all the obstacles represented by a set of segments on the plane. These segments of the robot can not intersect at interior points, but he can pass through the ends of the segments, and can also walk along the segment.
Input
The first line contains one integer N — number of segments, constraints (0 <= N <= 100). Then there are N rows of four integers X_1, Y_1, X_2 and Y_2 in each. It coordinates all of the segment. The last two lines contain X and Y coordinates of points A and B. It is guaranteed that all the coordinates of the module does not exceed 1000, and none of the ends of the segments do not belong to another segment. The starting and ending points are different ways and do not belong to any segment.
Output
Bring one number - the length of the shortest path from point A to point B with four characters after the decimal point. If the desired path does not exist, then print out -1.