Interested in Skiing
시간 제한1초메모리 제한512 MB
고정된 수직 속도로 위로 이동하는 스키어가 폭이 제한된 띠 안에서 서로 교차하지 않는 선분 장애물을 통과할 수 있게 하는 최소 수평 속도를 구한다.
문제
Kotori is interested in skiing. The skiing field is an infinite strip going along -axis on the 2-dimensional plane where all points in the field satisfies . When skiing, Kotori cannot move out of the field, which means that the absolute value of his -coordinate should always be no more than . There are also 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 -coordinate as a negative infinity) and moves towards the positive direction of the -axis. Her vertical (parallel to the -axis) speed is always which cannot be changed, however she can control her horizontal (parallel to the -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 , and (, , ), indicating the number of obstacles, the half width of the skiing field and the vertical speed.
For the following lines, the -th line contains four integers , , and (, , or ) indicating the -th obstacle which is a segment connecting point and , 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 .