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

题目描述

Kotori is interested in skiing. The skiing field is an infinite strip going along y-axis on the 2-dimensional plane where all points (x, y) in the field satisfies . When skiing, Kotori cannot move out of the field, which means that the absolute value of his x-coordinate should always be no more than m. There are also n segments on the ground which are the obstacles and Kotori cannot move across the obstacles either.

Kotori will start skiing from (you can regard this y-coordinate as a negative infinity) and moves towards the positive direction of the y-axis. Her vertical (parallel to the y-axis) speed is always v_y which cannot be changed, however she can control her horizontal (parallel to the x-axis) speed in the interval of . The time that Kotori changes her velocity can be neglected.

Your task is to help Kotori calculate the minimum value of that once she can safely ski through the skiing field without running into the obstacles.

输入描述:

There is only one test case in each test file.

The first line of the input contains three positive integers n, m and v_y (, , ), indicating the number of obstacles, the half width of the skiing field and the vertical speed.

For the following n lines, the i-th line contains four integers x_1, y_1, x_2 and y_2 (, , or ) indicating the i-th obstacle which is a segment connecting point (x_1, y_1) and (x_2, y_2), both inclusive (that is to say, these two points are also parts of the obstacle and cannot be touched). It's guaranteed that no two obstacles intersect with each other.

输出描述:

Output one line containing one number indicating the minimum value of . If it is impossible for Kotori to pass through the skiing field, output "-1" (without quotes) instead.

Your answer will be considered correct if and only if its absolute or relative error does not exceed .
示例1

输入

复制
3 2 1
-2 0 1 0
-1 4 2 4
0 1 0 3

输出

复制
1.000000000000000
示例2

输入

复制
2 1 2
-1 0 1 0
1 1 0 1

输出

复制
-1
示例3

输入

复制
2 3 7
-3 0 2 2
3 1 -2 17

输出

复制
1.866666666666666
示例4

输入

复制
1 100 1
-100 0 99 0

输出

复制
0.000000000000000