1046_I. Say Hello
Two friends are travelling through Bubble galaxy. They say "Hello!" via signals to each other if their distance is smaller or equal than d_1 and 

  * it's the first time they speak to each other or 
  * at some point in time after their last talk their distance was greater than d_2. 



We need to calculate how many times friends said "Hello!" to each other. For N moments, you'll have an array of points for each friend representing their positions at that moment. A person can stay in the same position between two moments in time, but if a person made a move we assume this movement as movement with constant speed in constant direction.

Input

The first line contains one integer number N (2 ≤ N ≤ 100 000) representing number of moments in which we captured positions for two friends.

The second line contains two integer numbers d_1 and d_2 \ (0 < d_1 < d_2 < 1000). 

The next N lines contains four integer numbers A_x,A_y,B_x,B_y (0 ≤ A_x, A_y, B_x, B_y ≤ 1000) representing coordinates of friends A and B in each captured moment.

Output

Output contains one integer number that represents how many times friends will say "Hello!" to each other.

Example

Input

4
2 5
0 0 0 10
5 5 5 6
5 0 10 5
14 7 10 5


Output

2

Note

<image> Explanation: Friends should send signals 2 times to each other, first time around point A2 and B2 and second time during A's travel from point A3 to A4 while B stays in point B3=B4. 
```python
from sys import stdin

stdin = iter(stdin)

class Vector:
    ''''''
    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __sub__(self, other):
        return Vector(self.x - other.x, self.y - other.y)

    def __add__(self, other):
        return Vector(self.x + other.x, self.y + other.y)

    def dot(self, vec2):
        return self.x * vec2.x + self.y * vec2.y

    def cross(self, vec2):
        return self.x * vec2.y - self.y * vec2.x

    def norm_square(self):
        return self.dot(self)

    def __str__(self):
        return str((self.x, self.y))

    __radd__ = __add__
    __rsub__ = __sub__

def min_distnace_less_than_d1(ab1: Vector, ab2: Vector, d1: int):
    ''' '''
    L = ab2 - ab1
    proj1 = ab1.dot(L)
    proj2 = ab2.dot(L)
    between = (proj1 * proj2 < 0)
    if between:
        # altitude is minimum
        # return altitude < d
        # return |ab1.cross(L)| / sqrt(L.norm_square()) < d
        return ab1.cross(L)**2 <= d1**2 * L.norm_square()
    else:
        # minimum edge is minimum distnace
        minSquare = min([ab1.norm_square(), ab2.norm_square()])
        return minSquare <= d1**2


if __name__ == "__main__":
    N = int(next(stdin))
    d1, d2 = (int(x) for x in next(stdin).split())
    ABs = []
    for _ in range(N):
        Ax, Ay, Bx, By = (int(x) for x in next(stdin).split())
        ABs.append(Vector(Bx, By) - Vector(Ax, Ay))

    resetState = True
    count = 0

    for i in range(len(ABs)-1):
        ab1, ab2 = ABs[i:i+2]
        if resetState and min_distnace_less_than_d1(ab1, ab2, d1):
            count += 1
            resetState = False

        resetState = resetState or (ab2.norm_square() > d2**2)

    print(count)

```