#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
class MaximumMatching {
  /*
  Maximum Matching in General Graphs
  - O(nm \log_{\max\{2, 1 + m/n\}} n) time
  - O(n + m) space
  Note: each vertex is 1-indexed.
  */

public:
    struct Edge { int from, to; Edge() {} Edge(int a, int b) : from(a), to(b) {} };

  MaximumMatching(int N, const vector<Edge>& raw_edges) : n(N) {
    ofs.assign(N + 2, 0);
    for (auto& e : raw_edges) ++ofs[e.from + 1], ++ofs[e.to + 1];
    for (int i = 1; i <= N + 1; ++i) ofs[i] += ofs[i - 1];
    edges.resize(2 * raw_edges.size());
    for (auto& e : raw_edges) {
      edges[ofs[e.from]++] = {e.from, e.to};
      edges[ofs[e.to]++] = {e.to, e.from};
    }
    for (int i = N + 1; i > 0; --i) ofs[i] = ofs[i - 1];
    ofs[0] = 0;
  }

  int maximum_matching() {
    vector<int> label(n + 1, -1), mate(n + 1, 0), first(n + 1, 0);
    vector<int> que(n);
    int qh = 0, qt = 0;

    auto enqueue = [&] (int v) { que[qt++] = v; };
    auto dequeue = [&] { return que[qh++]; };
    auto encode = [&] (int eid) { return (n + 1) + eid; };
    auto decode = [&] (int h) { return h - (n + 1); };

    function< int(int) > find_first = [&] (int v) {
      return label[first[v]] < 0 ? first[v] : first[v] = find_first(first[v]);
    };

    function< void(int, int) > rematch = [&] (int v, int w) {
      auto t = mate[v]; mate[v] = w;
      if (mate[t] != v) return;
      if (label[v] <= n) {
        mate[t] = label[v];
        rematch(label[v], t);
      } else {
        auto& e = edges[decode(label[v])];
        int x = e.from, y = e.to;
        rematch(x, y); rematch(y, x);
      }
    };

    auto contract = [&] (int x, int y, int eid) {
      int r = find_first(x), s = find_first(y);
      if (r == s) return;
      auto h = encode(eid);
      label[r] = label[s] = -h;
      int join = -1; // mate[lca]
      while (1) {
        if (s != 0) swap(r, s);
        r = find_first(label[mate[r]]);
        if (label[r] == -h) {
          join = r;
          break;
        } else label[r] = -h;
      }
      for (auto v : { first[x], first[y] }) {
        for (; v != join; v = first[label[mate[v]]]) {
          label[v] = h;
          first[v] = join;
          enqueue(v);
        }
      }
    };

    auto augmented = [&] (int u) {
      label[u] = first[u] = 0;
      for (qh = qt = 0, enqueue(u); qh < qt; ) {
        auto x = dequeue();
        for (int eid = ofs[x]; eid < ofs[x + 1]; ++eid) {
          auto y = edges[eid].to;
          if (mate[y] == 0 && y != u) {
            mate[y] = x;
            rematch(x, y);
            return true;
          } else if (label[y] >= 0) {
            contract(x, y, eid);
          } else if (label[mate[y]] < 0) {
            label[mate[y]] = x;
            first[mate[y]] = y;
            enqueue(mate[y]);
          }
        }
      }
      return false;
    };

    int match = 0;
    for (int u = 1; u <= n; ++u) if (mate[u] == 0 && augmented(u)) {
      match += 1;
      if (n - 2 * match <= 1) break;
      if (10 * qt < n) {
        label[0] = -1;
        for (int qi = 0; qi < qt; ++qi) {
          label[que[qi]] = label[mate[que[qi]]] = -1;
        }
      } else fill(label.begin(), label.end(), -1);
    }

    /*
    vector< pair<int, int> > matching(match);
    match = 0;
    rep(u, 1, N + 1) if (mate[u] > u) {
      matching[match++] = {u, mate[u]};
    }
    */

    return match;
  }

private:
  int n;
  vector<int> ofs;
  vector<Edge> edges;
};
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/






int N, A, B, a[808], b[808];
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> A >> B;
    rep(i, 0, N) cin >> a[i] >> b[i];

    int ans = 0;
    vector<int> v;
    
    // 操作1
    rep(i, 0, N) {
        int d = abs(a[i] - b[i]);
        if (d <= A or (B <= d and d <= 2 * A)) ans++;
        else v.push_back(i);
    }

    int n = v.size();
    if (0 < n) {
        // 操作2
        vector<MaximumMatching::Edge> edges;
        rep(_i, 0, n) rep(_j, 0, n) {
            int i = v[_i];
            int j = v[_j];
            if (i != j) {
                int d = abs(a[i] + a[j] - b[i] - b[j]);
                if (d <= A or (B <= d and d <= 2 * A)) {
                    edges.push_back(MaximumMatching::Edge(_i + 1, _j + 1));
                }
            }
        }

        MaximumMatching bm(n, edges);

        ans += bm.maximum_matching();
    }

    cout << ans << endl;
}


Measured memory_bytes: 4656