Protect the Trees

Time Limit: 6000/3000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

      Johnny has got a birthday present — a little puppy. He loves his puppy very much. He called him Merry. Merry is very little, but he’s already got his teeth. They are very sharp, and must be growing because he likes to gnaw everything that comes to his sight.
      Merry lives in Johnny’s backyard. But there is one problem. Johnny’s father — a botanist — has grown a couple of rare trees there. Now he is afraid that Merry can hurt their delicate bark. So Johnny is planning to protect the trees.
      He has found three long planks at his old workshop, so now is going to surround his trees by a triangular fence. No part of the plank must be outside the fence, because somebody could step upon it and fall down.
      It may turn out that it is impossible to surround all the trees. In this case Johnny wants to surround as many trees as possible. His father is still planning to use planks in some other way afterwards, so Johnny mustn’t cut them to pieces.
      Help Johnny to find out how many trees he can save.

Input

      The first line of the input file contains n — the number of father’s trees in Johnny’s backyard (1 ≤ n ≤ 70). The second line contains three integer numbers a, b and c — the lengths of planks Johnny’s father has got (1 ≤ a; b; c ≤ 104, a, b and c can be sides of a non-degenerate triangle). The following n lines contain two integer numbers each and describe trees. Each tree is described by its coordinates, they do not exceed 10by their absolute values. You can neglect the trees thickness. No two trees coincide.

Output

      Output one integer number — the number of the trees that can be saved.

Sample Input

5
3 4 6
6 0
0 0
1 2
2 3
6 1

Sample Output

3

Source

Andrew Stankevich Contest 21

Manager

Information
Solved Number2
Submit Number58
Problem Tags
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel