Every July, ACM University holds its sports day, and its highlight is "Roll-A-Big-Ball". In this game, players roll a ball along a straight course drawn on the ground. Rectangular parallelepiped blocks are fixed on the ground as obstacles. During the game the ball must not collide with any block, and the ball's bottom point must not leave the course.
To make the game more fun, the university wants to use the largest possible ball. Write a program that finds the largest radius of a ball that can reach the goal without colliding with any obstacle block.
The ball is a perfect sphere and the ground is a plane. Each block is a rectangular parallelepiped whose bottom rectangle lies on the ground with edges parallel to the x- or y-axis. The course is given as a line segment from a start point to an end point. The ball starts with its bottom point touching the start point and reaches the goal when its bottom point touches the end point.
The input consists of several datasets. Each dataset has the following format.
N
sx sy ex ey
minx1 miny1 maxx1 maxy1 h1
minx2 miny2 maxx2 maxy2 h2
...
minxN minyN maxxN maxyN hN
The first line of a dataset holds an integer $N$ ($1 \le N \le 50$), the number of blocks. The next line holds four space-separated integers giving the start point $(sx, sy)$ and the end point $(ex, ey)$. Each of the following $N$ lines describes one block with five space-separated integers: the two vertices $(minx, miny)$, $(maxx, maxy)$ of its bottom rectangle and the block height $h$. All integers satisfy the following conditions.
The last dataset is followed by a line containing a single zero.
For each dataset, output on its own line the largest radius, rounded to exactly 6 digits after the decimal point. If any block lies on the course line, the largest radius is defined to be zero. You may assume that the largest radius never exceeds 1000 for each dataset.