Zombie Land 2

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

As you know, your friend Tatsumi is a producer of Immortal Culture Production in Chiba (ICPC). He once planned to form a zombie rock band named Gray Faces and cheer Chiba Prefecture up, and still plans to do so.

But unfortunately, once again, there is only one zombie in ICPC. So Tatsumi decided to release the zombie into the city of Chiba after enhancing the zombie's infectious power, to produce a sufficient number of zombies. The infectious zombie changes a human into a new infectious zombie when the distance between the human and the zombie is less than or equal to DD. Note that a zombie that was a human also changes a human into a zombie.

The city of Chiba is represented by an infinitely large two-dimensional plane, and Tatsumi will release the zombie at a point with a coordinate (x_0,y_0)(x\_0, y\_0). After the release, the zombie will start walking at a speed of (v_x,0,v_y,0)(v\_{x,0}, v\_{y,0})per second. There are also NN humans on the two-dimensional plane. When Tatsumi releases the zombie, the ii-th human will be at a point with a coordinate (x_i,y_i)(x\_i, y\_i)and will start walking at a speed of (v_x,i,v_y,i)(v\_{x,i}, v\_{y,i})per second. Humans will not change their walking direction or speed when they become zombies.

For each human, Tatsumi wants to know when the human becomes a zombie. Please help him by writing a program that calculates a time when each human becomes a zombie.

입력

The input consists of a single test case of the following format.

NN DD

x_0x\_0 y_0y\_0 v_x,0v\_{x,0} v_y,0v\_{y,0}

x_1x\_1 y_1y\_1 v_x,1v\_{x,1} v_y,1v\_{y,1}

\vdots

x_Nx\_N y_Ny\_N v_x,Nv\_{x,N} v_y,Nv\_{y,N}

The first line contains two integers NN and DD (1N1031 ≤ N ≤ 10^3, 0D1040 ≤ D ≤ 10^4) separated by a space, which represent the number of humans and the distance to be infected. The following line contains four integers x_0x\_0 y_0y\_0 v_x,0v\_{x,0} and v_y,0v\_{y,0} (104x_0,y_0,v_x,0,v_y,0104-10^4 ≤ x\_0 , y\_0 , v\_{x,0} , v\_{y,0} ≤ 10^4) separated by a space, which represent the initial position and direction of the zombie. Each of the next NN lines contains four integers x_ix\_i, y_iy\_i, v_x,iv\_{x,i} and v_y_iv\_{y\_i} (104x_i,y_i,v_x,i,v_y,i104-10^4 ≤ x\_i , y\_i , v\_{x,i} , v\_{y,i} ≤ 10^4) separated by a space, which represent the initial position and direction of the ii-th human.

출력

The output consists of NN lines. In the ii-th line, print the time when the ii-th human becomes a zombie. If the ii-th human will never become a zombie, print 1-1 instead. The answer will be considered as correct if the values output have an absolute or relative error less than 10710^{-7}.