#P1441. LightandShadow

LightandShadow



A nuclear explosion happened and how many sticks on the ground will be illuminated by the radiation? You can assume that the ground is flat, and no radiation can go through the sticks, and any two sticks have no intersections.
To simplify the problem, no two endpoints located on the path of a single radiation.

Input

For each case, the first line contains the number of sticks n(1~10,000), until the end of file.The second line includes (sx, sy) to denote the position of explosion center.Then following n lines are the sticks expressed in (ax, ay) and (bx, by).

Output

For each case, print the number of sticks which would be illuminated.

Sample Input

6
0.5 0.5
1.0 -1.0 1.0 1.0
1.5 1.0 1.5 -1.0
2.0 -1.0 2.0 1.0
-1.0 -1.0 -1.0 1.0
-1.5 1.0 -1.5 -1.0
-2.0 -1.0 -2.0 1.0

Sample Output

2

HINT

Source