Moving Points

Time limit1sMemory limit128 MB

Problem

Several target points move in a plane. Each target point travels along a straight line at a constant speed and never changes direction. A single chaser point starts at the origin $(0, 0)$ and moves at a constant speed that is strictly greater than the speed of every target point. Unlike the targets, the chaser may change direction instantly at any moment.

The chaser catches a target the instant they occupy the same point in the plane at the same time; contact may be momentary, so the chaser does not need to stay with a target for any positive length of time. After catching one target, the chaser continues on to catch another, and so on, until every target has been caught.

Given the chaser's speed and the initial position, heading, and speed of each target, find the minimum total time the chaser needs to catch all of the targets.

Input

The input contains several test cases. Each test case begins with a line holding two integers:

N C

where $N$ ($1 \le N \le 15$) is the number of target points and $C$ ($0 < C \le 1000$) is the speed of the chaser.

Each of the next $N$ lines describes one target with four integers:

X Y D S

where $(X, Y)$ ($-1000 \le X, Y \le 1000$) is the position of that target at time $0$, $D$ ($0 \le D < 360$) is its heading in degrees ($0$ degrees points along the positive $x$-axis and $90$ degrees along the positive $y$-axis), and $S$ ($0 \le S < C$) is its speed. Every target begins moving at time $0$.

The input ends with a line containing two zeros: 0 0.

Output

For each test case, print on its own line the minimum time the chaser needs to catch every target, rounded half up to two decimal places and always shown with exactly two digits after the decimal point. Print no extra spaces and do not separate answers with blank lines.