시간 제한 | 메모리 제한 | 제출 | 정답 | 맞은 사람 | 정답 비율 |
---|---|---|---|---|---|

2 초 | 256 MB | 0 | 0 | 0 | 0.000% |

As the Ancient romans knew, not only the Earth, but the entire Universe is flat. Moreover, the center of the Universe is the planet Earth, and every celestial body can be represented by a pair of coordinates (x, y) in a coordinate system centered at the planet Earth. The celestial bodies have a fixed position that never changes. In the observable universe there are N stars, each with a position (x_{i} y_{i}) and luminosity L_{i}.

In the year 2154, there is hectic preparation on building a new system of two deep space sensors in a distant orbit around the Earth. Both sensors will be stationed on distance R from Earth. The sensors are really sensitive to light that hits them. Taking this into account, the scientists want to place both sensors in similar conditions in order to get compatible observations. This means that the positions of the sensors must be chosen in such a way that the maximum observed brightness on the surface of the sensors is the same. An additional safety constraint is that the sensors must be as far away from each other as possible.

The maximum observed brightness on the surface of the sensor is the maximum value of the observed brightnesses based on each star. The observed brightness based on a star with luminosity L and distance r from a fixed point is given by the formula \(F = \frac{L}{4 \pi r^2}\). We remind you that, in the plane of the Universe the distance between two points with coordinates (x_{i} y_{i}) and (x_{j} y_{j}) is calculated by \(r = \sqrt{(x_i-x_j)^2 + (y_i-y_j)^2}\). The sensors, the planet Earth and all celestial bodies are points with negligible sizes. There are no other bodies in the Universe, except the ones mentioned in the problem statement.

Write a program orbit, which given R – orbit (distance from Earth), in which to place the two sensors, and N stars, each given with coordinates (x_{i}, y_{i}) and luminosity L_{i}, finds two points (X_{1}, Y_{1}), (X_{2}, Y_{2}), at distance R from Earth (The Earth is a point with coordinates (0, 0)) such that:

- the maximum observed brightness is the same;
- the distance between the two points is as large as possible.

On the first line of the standard input are given two integers (N – the number of stars and R – the desired distance from Earth, which is the orbit of the sensors), separated with a single space. N lines follow with three integers each: x_{i}, y_{i}, L_{i}: the coordinates and the luminosity of the i-th star. The numbers R, x_{i}, y_{i} are in the same units. (1 ≤ N ≤ 100000, 1 ≤ R ≤ 10^{9}, |x_{i}| ≤ 10^{9}, |y_{i}| ≤ 10^{9}, 0 < L_{i} ≤ 10^{9})

On the only line of the standard output, the program must output 4 real numbers: X_{1}, Y_{1}, X_{2}, and Y_{2}, separated with spaces – the found coordinates of both points in which the sensors must be placed. If there are no two points at distance R from Earth with the same (with precision up to 10^{-7}) maximum observed brightness, output a single line with the message No solution. The answer will be considered correct if the absolute or relative error is less than 10^{-7}.

1 2 10 0 3

0 2 0 -2

The points (-1.414213562, -1.414213562) and (-1.414213562, 1.414213562) are also hit by the same brightness and are distance R from Earth, but are closer to each other than (0, 2) and (0, -2).