#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>

using namespace std;

template<typename T>
class Dinic {
    struct edge {
        int to;
        T cap;
        int rev;
    };

    const T INF;
    vector< vector<edge> > graph;
    vector<T> min_cost;
    vector<int> iter;

    bool bfs(int s, int t) {
        min_cost.assign(graph.size(), -1);
        queue<int> que;
        min_cost[s] = 0;
        que.push(s);
        while (!que.empty()) {
            int q = que.front();
            que.pop();
            for (edge &e : graph[q]) {
                if (e.cap > 0 && min_cost[e.to] == -1) {
                    min_cost[e.to] = min_cost[q] + 1;
                    que.push(e.to);
                }
            }
        }
        return (min_cost[t] != -1);
    }

    T dfs(int idx, const int t, T flow) {
        if (idx == t) return flow;
        for (int &i = iter[idx]; i < graph[idx].size(); i++) {
            edge &e = graph[idx][i];
            if (e.cap > 0 && min_cost[idx] < min_cost[e.to]) {
                T d = dfs(e.to, t, min(flow, e.cap));
                if (d > 0) {
                    e.cap -= d;
                    graph[e.to][e.rev].cap += d;
                    return d;
                }
            }
        }
        return 0;
    }

    public:
    Dinic(int n) : INF(numeric_limits<T>::max()/100) {
        graph.resize(n);
    }

    void add_edge(int from, int to, T cap) {
        graph[from].push_back((edge){to, cap, static_cast<int>(graph[to].size())});
        graph[to].push_back((edge){from, 0, static_cast<int>(graph[from].size())-1}); //add reverse edge
    }

    T max_flow(int s, int t) {
        T flow = 0;
        while (bfs(s, t)) {
            iter.assign(graph.size(), 0);
            T f = 0;
            while ((f = dfs(s, t, INF)) > 0) {
                flow += f;
            }
        }
        return flow;
    }
};

void coloring(vector<int>& c, int n, vector< vector<int> >& es, int nc) {
    if (c[n] == -1) {
        c[n] = nc;
    } else {
        return;
    }
    for (auto&& var : es[n]) {
        coloring(c, var, es, nc==1 ? 0 : 1);
    }
    return;
}

void solve(int N, int A, int B, vector<int> a, vector<int> b) {
    int ans = 0;
    vector<bool> used(N, false);
    for (int i = 0; i < N; i++) {
        int x = abs(a[i] - b[i]);
        if ((x<=A) || ((B<=x) && (x<=2*A))) {
            ans++;
            used[i] = true;
        }
    }
    /*
    Dinic<long long> G(N*2 + 2);
    std::cout << "2rule" << std::endl;
    for (int i = 0; i < N; i++) {
        G.add_edge(2*N, i, 1);
        G.add_edge(N+i, 2*N+1, 1);
    }
    for (int i = 0; i < N-1; i++) {
        if (used[i]) {
            continue;
        }
        for (int j = i+1; j < N; j++) {
            if (used[j]) {
                continue;
            }
            int x = abs(a[i]+a[j]-b[i]-b[j]);
            if ((x<=A) || ((B<=x)&&(x<=2*A))) {
                std::cout << a[i] << ' ' << b[i] << ' ' << a[j] << ' ' << b[j] << std::endl;
                G.add_edge(i, N+j, 1);
            }
        }
    }
    */
    Dinic<long long> G(N + 2);
    vector< vector<int> > es(N);
    vector< pair<int, int> > g;
    vector<int> c(N, -1);
    for (int i = 0; i < N-1; i++) {
        if (used[i]) {
            continue;
        }
        for (int j = i+1; j < N; j++) {
            if (used[j]) {
                continue;
            }
            int x = abs(a[i]+a[j]-b[i]-b[j]);
            if ((x<=A) || ((B<=x)&&(x<=2*A))) {
                es[i].push_back(j);
                es[j].push_back(i);
                g.push_back(make_pair(i, j));
            }
        }
    }
    for (int i = 0; i < N; i++) {
        coloring(c, i, es, 1);
    }
    for (int i = 0; i < g.size(); i++) {
        if (c[g[i].first] == 1) {
            G.add_edge(g[i].first, g[i].second, 1);
        } else {
            G.add_edge(g[i].second, g[i].first, 1);
        }
    }
    for (int i = 0; i < N; i++) {
        if (c[i] == 1) {
            G.add_edge(N, i, 1);
        } else {
            G.add_edge(i, N+1, 1);
        }
    }
    ans += G.max_flow(N, N+1);
    std::cout << ans << std::endl;
}

int main() {
    int N, A, B;

    std::cin >> N;
    std::cin >> A;
    std::cin >> B;
    vector<int> a(N);
    vector<int> b(N);
    for (int i = 0; i < N; i++) {
        std::cin >> a[i] >> b[i];
    }
    solve(N, A, B, a, b);

    return 0;
}



Measured memory_bytes: 6588