#abc263h. [abc263_h]Intersection 2
[abc263_h]Intersection 2
Problem Statement
There are lines in a two-dimensional plane. The -th line is . It is guaranteed that no two of the lines are parallel.
In this plane, there are intersection points of two lines, including duplicates. Print the distance between the origin and the -th nearest point to the origin among these points.
Constraints
- $\-1000 \\le |A_i|,|B_i|,|C_i| \\le 1000(1 \\le i \\le N)$
- No two of the lines are parallel.
- or .
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print a real number representing the answer.
Your output is considered correct when its absolute or relative error from the judge's output is at most .
Sample Input 1
3 2
1 1 1
2 1 -3
1 -1 2
Sample Output 1
2.3570226040
Let us call the -th line Line .
- The intersection point of Line and Line is , whose distance to the origin is .
- The intersection point of Line and Line is , whose distance to the origin is .
- The intersection point of Line and Line is , whose distance to the origin is .
Therefore, the second nearest intersection point is , and should be printed.
Sample Input 2
6 7
5 1 9
4 4 -3
8 -1 2
0 1 -8
4 0 -4
2 -3 0
Sample Output 2
4.0126752298