Largest Empty Circle on a Segment#1395

Largest Empty Circle on a Segment

1 second
64 megabytes
Easy

We are given line segments on the plane. Find the maximum possible radius of an empty circle whose center (xc, yc) satisfies the following conditions:

A circle is considered empty if no part of any segment is located strictly inside it (a segment may touch the circle, but may not intersect with its interior).

Input

The first line contains the number of test cases . Each test case description follows. The first line of each test case contains the integers and (1 \leq N \leq 2000, 0 \leq L \leq 10000). The next lines each contain integers: , , , , representing the endpoints (xa, ya) and (xb, yb) of a segment. All coordinates are in the range to . Each two consecutive numbers on the same line are separated by a single space.

Output

For each test case, print on a separate line a real number — the maximum possible radius of an empty circle whose center satisfies the given restrictions. Print the radius with decimal digits (use standard rounding rules).

Examples

Example 1

Loading
Loading