Meteor Shower
题号:NC252844
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Colin heard that there will be a meteor shower in a few days. As a romantic boyfriend, he plans to take Eva to admire it.

To simplify the problem, we will consider it on a two-dimensional plane.

Assuming the Earth is a circle with origin O as its center and r as its radius. The points on the circle form the surface of the Earth (i.e. points satisfy x^2+y^2=r^2). A meteor shower contains n meteors. Each meteor is given by a point (x_i, y_i) on the two-dimensional plane representing the point at which a meteor appears at a certain moment, and a direction vector (dx_i, dy_i) representing the direction of its movement, the meteor will move continuously in this direction unless it collides with the Earth, that means we don't consider the collision between meteors (i.e. the movements of different meteors are independent).



In order to give Eva the best experience, Colin decided to take her to the optimal observation site, which is said to be the closest point on the surface of Earth to the trace of the given meteor. Watching a meteor is not always safe. Once a meteor collides with Earth, it is called a meteorite. If it will be a meteorite, Colin will take Eva to witness the place it crash. So Colin wants to know whether or not a meteor will collide with Earth (if it comes into contact with the Earth's surface, it is considered a collision). If it will, Colin wants to know the point it crash; and if not, Colin wants to know where the optimal observation site is.

Please determine whether a meteor will collide with the Earth:
  • If it does, output "Crash at (x,y)", (x,y) is the point the meteorite crashed.
  • If it does not, output "Observe at (x,y)", (x,y) is the optimal observation point.
All the coordinates you output should be rounded into 4 decimals.

输入描述:

The first line contains two positive integers n,r \text{ }(1 \le n \le 10^5, 1 \le r \le 10^9 ) , representing the number of meteors and the radius of the earth.

For the following n lines, each line contains four integers x_i,y_i,dx_i, dy_i \text{ } (-10^9 \le x_i,y_i,dx_i,dy_i \le 10^9, (dx_i, dy_i) \neq (0,0)) ; (x_i,y_i) represents the start point of the i-th meteor and (dx_i,dy_i) represents the moving direction of the i-th meteor.

It's guaranteed that the distance between origin O and the start point of a meteor is at least r+0.1 .

输出描述:

Output n lines, each line represents the answer of the i-th meteor:

If the i-th meteor collide with the Earth, output "Crash at (x,y)"; (x,y) is the point the meteorite crashed. If it does not, output "Observe at (x,y)"; (x,y) is the optimal observation point. (without quotes)

All the coordinates you output should be rounded into 4 decimals, and the coordinates you output will be considered correct if the absolute error to the jury does not exceed 10^{-3} .
示例1

输入

复制
5 1
1 1 -1 0
2 2 -1 -1
2 1 -1 -1
2 3 -1 0
-1 -1 -1 -1

输出

复制
Crash at (0.0000,1.0000)
Crash at (0.7071,0.7071)
Crash at (1.0000,0.0000)
Observe at (0.0000,1.0000)
Observe at (-0.7071,-0.7071)

说明

The result of the example is shown as the image in the discription.