#D10716. Combine Two Elements

    ID: 8904 Type: Default 2000ms 536MiB

Combine Two Elements

Combine Two Elements

Problem

Given N N a pair of non-negative integers (ai,bi) (a_i, b_i) and non-negative integers A A , B B . I want to do as many of the following operations as possible.

  • aibi leqA | a_i --b_i | \ leq A or $ B \ leq | a_i --b_i | \ leq Take out and delete the element $ i thatsatisfies2A that satisfies 2A
  • (ai+aj)(bi+bj) leqA | (a_i + a_j)-(b_i + b_j) | \ leq A or $ B \ leq | (a_i + a_j)-(b_i + b_j) | Extract and delete the pair of j $ (i neqj i \ neq j )

Find the maximum number of operations.

Constraints

The input satisfies the following conditions.

  • 1 leqN leq800 1 \ leq N \ leq 800
  • 0 leqA,B leq105 0 \ leq A, B \ leq 10 ^ 5
  • 0 leqai,bi leq105 0 \ leq a_i, b_i \ leq 10 ^ 5
  • A leqB A \ leq B and B leq2A B \ leq 2A

Input

The input is given in the following format.

N N A A B B a1 a_1 b1 b_1 a2 a_2 b2 b_2 ... aN a_N bN b_N

All inputs are given as integers. N N , A A , B B are given on the first line, separated by blanks. The i i th pair ai a_i and bi b_i (1 leqi leqN 1 \ leq i \ leq N ) are given in the second and subsequent N N lines, separated by blanks.

Output

Output the maximum number of operations on one line.

Examples

Input

5 3 5 7 2 13 1 1 1 2 9 2 4

Output

4

Input

10 7 12 34 70 36 0 12 50 76 46 33 45 61 21 0 1 24 3 98 41 23 84

Output

5

inputFormat

input satisfies the following conditions.

  • 1 leqN leq800 1 \ leq N \ leq 800
  • 0 leqA,B leq105 0 \ leq A, B \ leq 10 ^ 5
  • 0 leqai,bi leq105 0 \ leq a_i, b_i \ leq 10 ^ 5
  • A leqB A \ leq B and B leq2A B \ leq 2A

Input

The input is given in the following format.

N N A A B B a1 a_1 b1 b_1 a2 a_2 b2 b_2 ... aN a_N bN b_N

All inputs are given as integers. N N , A A , B B are given on the first line, separated by blanks. The i i th pair ai a_i and bi b_i (1 leqi leqN 1 \ leq i \ leq N ) are given in the second and subsequent N N lines, separated by blanks.

outputFormat

Output

Output the maximum number of operations on one line.

Examples

Input

5 3 5 7 2 13 1 1 1 2 9 2 4

Output

4

Input

10 7 12 34 70 36 0 12 50 76 46 33 45 61 21 0 1 24 3 98 41 23 84

Output

5

样例

10 7 12
34 70
36 0
12 50
76 46
33 45
61 21
0 1
24 3
98 41
23 84
5