#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

int match[809], c; bool p[10000009], used[809]; vector<int> g[809];

bool augment(int pos) {
	used[pos] = true;
	for (int i : g[pos]) {
		if (match[i] < 0 || !used[match[i]] && augment(match[i])) {
			match[pos] = i;
			match[i] = pos;
			return true;
		}
	}
	return false;
}
int bipartite_matching() {
	int res = 0;
	fill(match, match + c, -1);
	for (int i = 0; i < c; i++) {
		if (match[i] < 0) {
			fill(used, used + c, false);
			if (augment(i)) res++;
		}
	}
	return res;
}

int N, A, B, a[810], b[810], cnt; vector<int>X, Y;

int main() {
	cin >> N >> A >> B;
	for (int i = 1; i <= N; i++) {
		cin >> a[i] >> b[i];
		if (abs(a[i] - b[i]) <= A || (B <= abs(a[i] - b[i]) && abs(a[i] - b[i]) <= 2 * A)) {
			cnt++;
			continue;
		}
		if (a[i] - b[i] >= 0) X.push_back(a[i] - b[i]);
		else Y.push_back(a[i] - b[i]);
	}
	sort(X.begin(), X.end());
	sort(Y.begin(), Y.end());
	for (int i = 0; i < X.size(); i++) {
		for (int j = 0; j < Y.size(); j++) {
			if (abs(X[i] + Y[j]) <= A || (B <= abs(X[i] + Y[j]) && abs(X[i] + Y[j]) <= 2 * A)) {
				g[i].push_back(j + X.size());
				g[j + X.size()].push_back(i);
			}
		}
	}
	c = X.size() + Y.size();

	int cnt2 = bipartite_matching();

	cout << cnt + cnt2 << endl;
	return 0;
}

