题目描述
Problem
Given $ N $ a pair of non-negative integers $ (a_i, b_i) $ and non-negative integers $ A $, $ B $.
I want to do as many of the following operations as possible.
- $| a_i --b_i | \ leq A$ or $B \ leq | a_i --b_i | \$ i $ that satisfies 2A $
- $| (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 \ neq j$)
Find the maximum number of operations.
Constraints
The input satisfies the following conditions.
- $1 \ leq N \ leq 800$
- $0 \ leq A, B \ leq 10 ^ 5$
- $0 \ leq a_i, b_i \ leq 10 ^ 5$
- $A \ leq B$ and $B \ leq 2A$
Input
The input is given in the following format.
$ N $ $ A $ $ B $
$ a_1 $ $ b_1 $
$ a_2 $ $ b_2 $
...
$ a_N $ $ b_N $
All inputs are given as integers.
$ N $, $ A $, $ B $ are given on the first line, separated by blanks.
The $ i $ th pair $ a_i $ and $ b_i $ ($1 \ leq i \ leq N$) are given in the second and subsequent $ 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
输入格式
见题面
输出格式
见题面