D. Fresh Avocado
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

It is early fall. The weather is just turning chilly, and the leaves are beginning to display their vibrant hues. You've just started a new job at Torchy's Tacos. You are looking forward to a long and prosperous career here.

On your very first day, a surprising order comes in from the landlord: Make me a perfect Fresh Avocado taco, or your rent goes up.

The talented Torchy's staff immediately sets upon this task. The first step to preparing the Fresh Avocado taco is to cut the avocados in half. As the new hire, that job has been given to you.

An avocado can be represented as a circle of radius $$$r$$$ centered at the origin $$$(0,0)$$$. You know you have the skills to perform $$$n$$$ different types of cuts, each represented by the equation of a line that splits the avocado into two halves. Constructing the Fresh Avocado taco is a precise art, and so the avocado must be cut in as close to perfect halves as possible. Thus, you must choose a cut to perform which splits the avocado into halves that are closest in area.

If you choose the optimal cut, what proportion of the avocado is in each half of the cut?

Input

The first line of input contains two integers $$$n\ (1\leq n \leq 10^5)$$$ and $$$r\ (1\leq r\leq 10^4)$$$ — the number of different cuts you can do and the radius of the avocado.

The next $$$n$$$ lines contain three integers $$$A_i, B_i, C_i\ (|A_i|, |B_i|, |C_i|\leq 10^4)$$$ describing the equation $$$A_ix + B_iy + C_i = 0$$$ for the $$$i$$$th cut.

It is guaranteed that each cut intersects the avocado at exactly two points, and for each cut, either $$$A_i\not=0$$$ or $$$B_i\not=0$$$.

Output

Output the proportion of the avocado's area of the smaller half and then the bigger half of the optimal cut. Your answer will be considered correct if its absolute or relative error doesn't exceed $$$10^{-6}$$$.

Examples
Input
2 2
0 1 0
1 0 1
Output
0.5 0.5
Input
1 10
2 -2 -1
Output
0.4774967821 0.5225032179
Note

In the first test case, the avocado is the green circle, the first cut is the blue dotted line and the second cut is the red dotted line. Choosing the first cut is optimal as it splits the avocado in exact halves.