#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
typedef pair<int,int> pi;
typedef tuple<int,int,int> piii;
#define pb(a) push_back(a)
#define m0(x) memset(x,0,sizeof(x))
#define print(x) cout<<x<<endl;
#define pe(x) cout<<x<<" ";
#define all(x) (x).begin(), (x).end()
const ll NMAX=300000;


ll N,a,b,T;
vector<ll> x(NMAX);
vector<ll> y(NMAX);
ll ans=0;
map<ll, vector<ll>> sumans, diffans;
map<ll, set<ll>> sumlist, difflist;
map<pii,ll> sumind,diffind;


ll ub(vector<ll> & v, ll n){
  return upper_bound(v.begin(),v.end(),n)-v.begin();
}
ll lb(vector<ll> & v, ll n){
  return lower_bound(v.begin(),v.end(),n)-v.begin();
}



ll sum(ll i) {return x[i]+y[i];}
ll diff(ll i) {return x[i]-y[i];}
ll d(ll a,ll b) {return abs(x[a]-x[b])+abs(y[a]-y[b]);}


void dfs(ll n){
  
    cerr<<n<<" | ";
    
    vector<ll> next;
    // CASE 1   sum(CURR)-sum(NEXT)=target   x_curr >= x_next >= x_curr-target
    vector<ll> & C1=sumans[x[n]+y[n]-T];
    ans+=max(0ll,ub(C1,y[n])-ub(C1,y[n]-T));
    set<ll> & D1 = sumlist[x[n]+y[n]-T];
    for (auto i=D1.upper_bound(y[n]-T); i!=D1.upper_bound(y[n]); ++i){
      next.push_back(sumind[{x[n]+y[n]-T,*i}]);
    }
    // for (ll i: C1) cerr<<i<<" ";
    //   cerr<<"| ";
    // cerr<<ub(C1,y[n])<<" "<<ub(C1,y[n]-T)<<"   ";
    

    // CASE 2   -sum(CURR)+sum(NEXT)=target   x_next>=x_curr 
    vector<ll> &C2=sumans[x[n]+y[n]+T];
    ans+=max(0ll,lb(C2,y[n]+T)-lb(C2,y[n]));
    set<ll> &D2 = sumlist[x[n]+y[n]+T];
    for (auto i=D2.lower_bound(y[n]); i!=D2.lower_bound(y[n]+T); ++i){
      
      next.push_back(sumind[{x[n]+y[n]+T,*i}]);
    }

    // for (ll i: C2) cerr<<i<<" ";
    //   cerr<<"| ";
    // cerr<<lb(C2,y[n]+T)<<" "<<lb(C2,y[n])<<"   ";
    


    
    // CASE 3   diff(CURR)-diff(NEXT)=target    x_curr>=x_next
    vector<ll> & C3=diffans[x[n]-y[n]-T];
    ans+=max(0ll,ub(C3,y[n]+T)-ub(C3,y[n]));
    set<ll> & D3 = difflist[x[n]-y[n]-T];
    for (auto i=D3.upper_bound(y[n]); i!=D3.upper_bound(y[n]+T); ++i){
     
      next.push_back(diffind[{x[n]-y[n]-T,*i}]);
    }
    

    // for (ll i: C3) cerr<<i<<" ";
    //   cerr<<"| ";
    // cerr<<ub(C3,y[n]+T)<<" "<<ub(C3,y[n])<<"   ";
    

    
    // CASE 4   -diff(CURR)+diff(NEXT)=target  
    vector<ll> & C4=diffans[x[n]-y[n]+T];
    ans+=max(0ll,lb(C4,y[n])-lb(C4,y[n]-T));
    set<ll> & D4 = difflist[x[n]-y[n]+T];
    for (auto i=D4.lower_bound(y[n]-T); i!=D4.lower_bound(y[n]); ++i){
   
      next.push_back(diffind[{x[n]-y[n]+T,*i}]);
    }
    // for (ll i: C4) cerr<<i<<" ";
    //   cerr<<"| ";
    // cerr<<lb(C4,y[n]-T)<<" "<<lb(C4,y[n])<<"   ";
    



    for (ll i: next) {

      sumlist[sum(i)].erase(y[i]);
      difflist[diff(i)].erase(y[i]);
    } 
    // cerr<<"| ans= "<<ans<<"   ";
    // for (ll i: next) cerr<<i<<" ";
    //   cerr<<endl;
    for (ll i: next) dfs(i);



    // for (ll i: C2) cerr<<i<<" ";
    //   cerr<<"| ";
    // cerr<<ub(C2,x[n]+T)<<" "<<lb(C1,x[n]);
    
    


}



int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);
  cin >> N >> a >> b;
  a--; b--;

  for (ll i=0; i<N; i++){
    cin >> x[i] >> y[i];
    sumans[sum(i)].pb(y[i]);
    diffans[diff(i)].pb(y[i]);
    sumlist[sum(i)].insert(y[i]);
    difflist[diff(i)].insert(y[i]);   
    sumind[{sum(i),y[i]}]=i;
    diffind[{diff(i),y[i]}]=i;
  }

  sumlist[sum(a)].erase(y[a]);
  difflist[diff(a)].erase(y[a]);

  for (auto &p: sumans) sort(p.second.begin(),p.second.end());
  for (auto &p: diffans) sort(p.second.begin(),p.second.end());
  
  // for (auto p: diffans){
  //   cout<<p.first<<" | ";
  //   for (ll i: p.second)cout<<i<<" ";
  //     cout<<endl;
  // }


  T=d(a,b);
  dfs(a);
  
  cout<<ans/2<<endl;

  


  
} 




Measured memory_bytes: 115968