#include <vector>
#include <cassert>
#include <set>
#include <queue>
#include <functional>
#include <algorithm>

struct edge {
  int to;
  int label;
};


::std::vector<::std::pair<int,int>> gabow_edmonds(const ::std::vector<::std::vector<int>>& gra){
  int N = gra.size();
  ::std::vector<::std::vector<edge>> g(N + 1);
  ::std::vector<::std::pair<int,int>> edges;
  {
    int cnt = N + 1;
    for(int i = 0;i < N;i++){
      for(auto to : gra[i]){
        if(i < to){
          g[to + 1].push_back({i + 1,cnt});
          g[i + 1].push_back({to + 1,cnt++});
          edges.push_back({i + 1, to + 1});
        }
      }
    }
  }
  ::std::vector<int> mate(N + 1 , 0);
  ::std::vector<int> label(N + 1 , -1);
  ::std::vector<int> first(N + 1 , 0);

  ::std::function<int(int)> eval_first = [&](int x){
    if(label[first[x]] < 0) return first[x];
    first[x] = eval_first(first[x]);
    return first[x];
  };

  ::std::function<void(int,int)> rematch = [&](int v,int w){
    int t = mate[v];
    mate[v] = w;
    if(mate[t] != v) return;
    if(label[v] <= N){
      mate[t] = label[v];
      rematch(label[v] , t);
    }
    else{
      int x = edges[label[v] - N + 1].first;
      int y = edges[label[v] - N + 1].second;
      rematch(x , y);
      rematch(y , x);
    }
  };

  ::std::function<void(int,int,int)> assignLabel = [&](int x, int y,int num){
    int r = eval_first(x);
    int s = eval_first(y);
    int join = 0;
    if(r == s) return;
    label[r] = -num;
    label[s] = -num;
    while(true){
      if(s != 0) ::std::swap(r , s);
      r = eval_first(label[mate[r]]);
      if(label[r] == -num){
        join = r;
        break;
      }
      label[r] = -num;
    }
    int v = first[x];
    while(v != join){
      label[v] = num;
      first[v] = join;
      v = first[label[mate[v]]];
    }
    v = first[y];
    while(v != join){
      label[v] = num;
      first[v] = join;
      v = first[label[mate[v]]];
    }
    return;
  };

  ::std::function<bool(int)> augment_check = [&](int u){
    first[u] = 0;
    label[u] = 0;
    ::std::queue<int> que;
    que.push(u);
    while(!que.empty()){
      int x = que.front();
      que.pop();
      for(auto e : g[x]){
        int y = e.to;
        if(mate[y] == 0 && y != u){
          mate[y] = x;
          rematch(x , y);
          return true;
        }
        else if(label[y] >= 0){
          assignLabel(x , y , e.label);
        }
        else if(label[mate[y]] < 0){
          label[mate[y]] = x;
          first[mate[y]] = y;
          que.push(mate[y]);
        }
      }
    }
    return false;
  };

  for(int i = 1;i <= N;i++){
    if(mate[i] != 0) continue;
    if(augment_check(i)){
      ::std::fill(label.begin() , label.end() , -1);
    }
  }

  ::std::vector<::std::pair<int,int>> ans;
  for(int i = 1;i <= N;i++){
    if(i < mate[i]){
      ans.push_back({i , mate[i]});
    }
  }
  return ans;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)

int main(){
  int N,A,B;
  cin >> N >> A >> B;
  vector<int> a(N),b(N);
  for(int i = 0;i < N;i++){
    cin >> a[i] >> b[i];
  }
  vector<vector<int>> g(N * 2);
  for(int i = 0;i < N;i++){
    int t = abs(a[i] - b[i]);
    if(t <= A || (B <= t && t <= 2 * A)){
      g[i].push_back(i + N);
      g[i + N].push_back(i);
    }
  }
  for(int i = 0;i < N;i++){
    for(int j = i + 1;j < N;j++){
      int t = abs(a[i] + a[j] - b[i] - b[j]);
      if(t <= A || (B <= t && t <= 2 * A)){
        g[i].push_back(j);
        g[j].push_back(i);
      }
    }
  }

  cout << gabow_edmonds(g).size() << endl;
}



Measured memory_bytes: 16752