#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}


template<typename T>
struct SegmentTree{
  using P = pair<Int, T>;
  Int n;
  vector<P> v;
  vector< vector<T> > dat;
  SegmentTree(){};
  SegmentTree(Int n,vector<P> v):v(v){init(n);build();};

  void init(Int n_){
    n=1;
    while(n<n_) n<<=1;
    dat.assign(n<<1,vector<Int>());
  }

  void build(){
    for(auto p:v)
      dat[p.first+n].emplace_back(p.second);

    for(Int i=0;i<n;i++)
      sort(dat[i+n].begin(),dat[i+n].end());

    for(Int i=n-1;i;i--){
      merge(dat[(i<<1)|0].begin(),dat[(i<<1)|0].end(),
            dat[(i<<1)|1].begin(),dat[(i<<1)|1].end(),
            back_inserter(dat[i]));
    }
  }

  // [a,b) * [c,d)
  inline Int query(Int a,Int b,T c,T d){
    Int res=0;
    auto calc=[a,b,c,d](vector<T> &x){
                auto latte=lower_bound(x.begin(),x.end(),d);
                auto malta=lower_bound(x.begin(),x.end(),c);
                return Int(latte-malta);
              };
    for(Int l=a+n,r=b+n;l<r;l>>=1,r>>=1) {
      if(l&1) res+=calc(dat[l++]);
      if(r&1) res+=calc(dat[--r]);
    }
    return res;
  }
};

template<typename V>
V compress(V v){
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  return v;
}
template<typename T>
map<T, Int> dict(const vector<T> &v){
  map<T, Int> res;
  for(Int i=0;i<(Int)v.size();i++)
    res[v[i]]=i;
  return res;
}
map<char, Int> dict(const string &v){
  return dict(vector<char>(v.begin(),v.end()));
}

//INSERT ABOVE HERE
signed main(){
  Int n,a,b;
  cin>>n>>a>>b;
  a--;b--;
  vector<Int> xs(n),ys(n);
  for(Int i=0;i<n;i++) cin>>xs[i]>>ys[i];

  vector<Int> us(n),vs(n);
  map<Int, set<Int> > U,V;

  using P = pair<Int, Int>;
  map<P, Int> idx;
  for(Int i=0;i<n;i++){
    us[i]=xs[i]+ys[i];
    vs[i]=xs[i]-ys[i];
    idx[P(us[i],vs[i])]=i;
    U[us[i]].emplace(vs[i]);
    V[vs[i]].emplace(us[i]);
  }

  vector<Int> used(n,0);
  queue<Int> que;
  auto push=
    [&](Int v){
      used[v]=1;
      que.emplace(v);
      U[us[v]].erase(vs[v]);
      V[vs[v]].erase(us[v]);
    };
  push(a);push(b);

  Int dist=max(abs(us[a]-us[b]),abs(vs[a]-vs[b]));
  while(!que.empty()){
    Int v=que.front();que.pop();

    for(Int k=0;k<2;k++){
      Int pos=k?(us[v]-dist):(us[v]+dist);
      while(!U[pos].empty()){
        auto it=U[pos].lower_bound(vs[v]-dist);
        if(it==U[pos].end()) break;
        if(vs[v]+dist<*it) break;
        Int val=*it;
        push(idx[P(pos,val)]);
      }
    }

    for(Int k=0;k<2;k++){
      Int pos=k?(vs[v]-dist):(vs[v]+dist);
      while(!V[pos].empty()){
        auto it=V[pos].lower_bound(us[v]-dist);
        if(it==V[pos].end()) break;
        if(us[v]+dist<*it) break;
        Int val=*it;
        push(idx[P(val,pos)]);
      }
    }
  }

  const Int INF = 1e15;
  vector<Int> ps;
  ps.emplace_back(-INF);
  ps.emplace_back(+INF);
  for(Int i=0;i<n;i++){
    ps.emplace_back(us[i]-dist);
    ps.emplace_back(us[i]);
    ps.emplace_back(us[i]+dist);
  }
  ps=compress(ps);
  auto dc=dict(ps);

  vector<P> vp;
  for(Int i=0;i<n;i++)
    vp.emplace_back(dc[us[i]],vs[i]);

  SegmentTree<Int> seg(ps.size(),vp);

  long long ans=0;
  for(Int i=0;i<n;i++){
    if(!used[i]) continue;
    ans+=seg.query(dc[us[i]-dist],dc[us[i]+dist]+1,vs[i]-dist,vs[i]+dist+1);
    ans-=seg.query(dc[us[i]-dist]+1,dc[us[i]+dist],vs[i]-dist+1,vs[i]+dist);
  }

  cout<<ans/2<<endl;
  return 0;
}


Measured memory_bytes: 103828