#include<bits/stdc++.h>
using namespace std;
#define MAX 100005
typedef long long ll;
typedef pair< ll , ll > P;

ll N,a,b,D;
ll x[MAX],y[MAX];

unordered_map< ll , vector< P > > GXY;
unordered_map< ll , vector< P > > GYX;
unordered_map< ll , vector< P > > gxy;
unordered_map< ll , vector< P > > gyx;
set< P > st;

int main(){
  scanf("%lld %lld %lld",&N,&a,&b);
  a--,b--;
  for(int i=0;i<N;i++) scanf("%lld %lld",&x[i],&y[i]);
  D = abs(x[a]-x[b]) + abs(y[a]-y[b]);
  
  for(int i=0;i<N;i++){
    ll px=x[i],py=y[i];

    x[i]=px-py;
    y[i]=py+px;

    gxy[ x[i] ].push_back( P(y[i],i) );
    gyx[ y[i] ].push_back( P(x[i],i) );
    st.insert( P(x[i],y[i]) );
  }
  
  for(auto &v : gxy ){
    vector<P> &w=v.second;
    sort(w.begin(),w.end());
  }
  for(auto &v : gyx ){
    vector<P> &w=v.second;
    sort(w.begin(),w.end());
  }
  
  GXY=gxy;
  GYX=gyx;


  
  unordered_map< int , bool > used;
  queue<int> Q;
  Q.push(a);
  Q.push(b);
  used[a]=used[b]=true;
  while(!Q.empty()){
    int id=Q.front();Q.pop();
    //    cout<<id<<' '<<"!"<<endl;
    ll ax=x[id]-D;
    ll bx=x[id]+D;
    ll ay=y[id]-D;
    ll by=y[id]+D;
    
    vector<P> :: iterator it,it2,I;

    vector<P> &lxy=gxy[ax];
    it=lower_bound(lxy.begin(),lxy.end(), P(ay,-1) );
    it2=upper_bound(lxy.begin(),lxy.end(), P(by,N+1) );
    for(I = it ; I!=it2 ; I++){
      if(!used[ I->second ]){
        //cout<<id<<' '<<I->second<<endl;  /////////////////////////
        Q.push( I->second );
        used[ I->second ]=true;
      }
    }
    lxy.erase( it , it2 );
    
    vector<P> &lyx=gyx[ay];
    it=lower_bound(lyx.begin(),lyx.end(), P(ax,-1) );
    it2=upper_bound(lyx.begin(),lyx.end(), P(bx,N+1) );
    for(I = it ; I!=it2 ; I++){
      if(!used[ I->second ]){
        //cout<<id<<' '<<I->second<<endl;  /////////////////////////
        Q.push( I->second );
        used[ I->second ]=true;
      }
    }
    lyx.erase( it , it2 );

    vector<P> &rxy=gxy[bx];
    it=lower_bound(rxy.begin(),rxy.end(), P(ay,-1) );
    it2=upper_bound(rxy.begin(),rxy.end(), P(by,N+1) );
    for(I = it ; I!=it2 ; I++){
      if(!used[ I->second ]){
        //cout<<id<<' '<<I->second<<endl;  /////////////////////////
        Q.push( I->second );
        used[ I->second ]=true;
      }
    }
    rxy.erase( it , it2 );

    
    vector<P> &ryx=gyx[by];
    it=lower_bound(ryx.begin(),ryx.end(), P(ax,-1) );
    it2=upper_bound(ryx.begin(),ryx.end(), P(bx,N+1) );
    for(I = it ; I!=it2 ; I++){
      if(!used[ I->second ]){
        //cout<<id<<' '<<I->second<<endl;  /////////////////////////
        Q.push( I->second );
        used[ I->second ]=true;
      }
    }
    ryx.erase( it , it2 );

  }


  //----------------------------------
  ll ans=0;
  for(int i=0;i<N;i++){
    if(used[i]==false)continue;

    
    int id=i;
    ll ax=x[id]-D;
    ll bx=x[id]+D;
    ll ay=y[id]-D;
    ll by=y[id]+D;
    ll num=0;
    
    vector<P> :: iterator it,it2,I;

    vector<P> &lxy=GXY[ax];
    it=lower_bound(lxy.begin(),lxy.end(), P(ay,-1) );
    it2=upper_bound(lxy.begin(),lxy.end(), P(by,N+1) );
    num+= (ll)(it2-it); 
    //    if(i==3)cout<<(it2-it)<<endl;
    
    vector<P> &lyx=GYX[ay];
    it=lower_bound(lyx.begin(),lyx.end(), P(ax,-1) );
    it2=upper_bound(lyx.begin(),lyx.end(), P(bx,N+1) );
    num+= (ll)(it2-it);
    //        if(i==3)cout<<(it2-it)<<endl;
    vector<P> &rxy=GXY[bx];
    it=lower_bound(rxy.begin(),rxy.end(), P(ay,-1) );
    it2=upper_bound(rxy.begin(),rxy.end(), P(by,N+1) );
    num+= (ll)(it2-it);
    //        if(i==3)cout<<(it2-it)<<endl;
    vector<P> &ryx=GYX[by];
    it=lower_bound(ryx.begin(),ryx.end(), P(ax,-1) );
    it2=upper_bound(ryx.begin(),ryx.end(), P(bx,N+1) );
    num+= (ll)(it2-it);
    //    if(i==3){cout<<(it2-it)<<' '<<ryx.size()<<' '<<by<<' '<<y[id]<<endl;}

    num-=st.count(P(ax,ay));num-=st.count(P(ax,by));
    num-=st.count(P(bx,ay));num-=st.count(P(bx,by));
    //    cout<< i <<' ' << num << "  x ="<<x[i]<<"  y="<<y[i]<<endl;
    ans+=num;
  }

  printf("%lld\n", ans/2LL);
  return 0;
}


Measured memory_bytes: 66904