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 D. 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). After the release, the zombie will start walking at a speed of (v_x,0,v_y,0)per second. There are also N humans on the two-dimensional plane. When Tatsumi releases the zombie, the i-th human will be at a point with a coordinate (x_i,y_i)and will start walking at a speed of (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.
N D
x_0 y_0 v_x,0 v_y,0
x_1 y_1 v_x,1 v_y,1
⋮
x_N y_N v_x,N v_y,N
The first line contains two integers N and D (1≤N≤103, 0≤D≤104) separated by a space, which represent the number of humans and the distance to be infected. The following line contains four integers x_0 y_0 v_x,0 and v_y,0 (−104≤x_0,y_0,v_x,0,v_y,0≤104) separated by a space, which represent the initial position and direction of the zombie. Each of the next N lines contains four integers x_i, y_i, v_x,i and v_y_i (−104≤x_i,y_i,v_x,i,v_y,i≤104) separated by a space, which represent the initial position and direction of the i-th human.
The output consists of N lines. In the i-th line, print the time when the i-th human becomes a zombie. If the i-th human will never become a zombie, print −1 instead. The answer will be considered as correct if the values output have an absolute or relative error less than 10−7.