# Problem C: Alice and Bob

Alice and Bob are in love with each other, but they have difficulty going out on a date - Alice is a very
busy graduate student at the ACM university.

For this reason, Bob came to the ACM university to meet her on a day. He tried to reach the meeting
spot but got lost because the campus of the university was very large. Alice talked with him via mobile
phones and identified his current location exactly. So she told him to stay there and decided to go to the
place where she would be visible to him without interruption by buildings.

The campus can be considered as a two-dimensional plane and all buildings as rectangles whose edges
are parallel to x-axis or y-axis. Alice and Bob can be considered as points. Alice is visible to Bob if the
line segment connecting them does not intersect the interior of any building. Note that she is still visible
even if the line segment touches the borders of buildings.

Since Alice does not like to walk, she wants to minimize her walking distance. Can you write a program
that finds the best route for her?

Figure 1: Example Situation

## Input

The input contains multiple datasets. The end of the input is indicated by a line containing a single zero.
Each dataset is formatted as follows.

*N*
*x*_{11} *y*_{11} *x*_{12} *y*_{12}
*x*_{21} *y*_{21} *x*_{22} *y*_{22}
...
*x*_{N1} *y*_{N1} *x*_{N2} *y*_{N2}
*A*_{x} A_{y} B_{x} B_{y}

*N* (0 < *N* ≤ 30) is the number of buildings. The *i*-th building is given by its bottom left corner (*x*_{i1} , *y*_{i1})
and up right corner (*x*_{i2}, *y*_{i2} ). (*A*_{x}, *A*_{y}) is the location of Alice and (*B*_{x}, *B*_{y}) is that of Bob. All integers *x*_{i1}, *y*_{i1}, *x*_{i2}, *y*_{i2}, *A*_{x}, *A*_{y}, *B*_{x} and *B*_{y} are between -10000 and 10000, inclusive. You may assume that no building
touches or overlaps other buildings.

## Output

For each dataset, output a separate line containing the minimum distance Alice has to walk.

The value may contain an error less than or equal to 0.001. You may print any number of digits after the
decimal point.

## Sample Input

1
3 3 7 7
2 2 8 2
2
2 5 5 9
6 1 9 5
1 5 10 5
2
2 1 3 2
2 3 3 4
1 1 4 4
1
3 3 7 7
1 5 9 5
1
3 3 7 7
1 5 8 5
1
3 3 7 7
1 5 10 5
0

## Output for the Sample Input

0.000
0.000
0.000
5.657
6.406
4.992