#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))

// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;

int n,a,b;
int x[125252],y[125252];
bool jikued[125252];
map<int,set<pii>> sum,sub;
map<int,map<int,int>> ruisum,ruisub;

int main(){
  scanf("%d%d%d",&n,&a,&b);
  --a;--b;
  REP(i,n)scanf("%d%d",x+i,y+i);
  // find all jiku
  REP(i,n){
    sum[x[i]+y[i]].insert(pii(x[i],i));
    sub[x[i]-y[i]].insert(pii(x[i],i));
  }
  int dis = abs(x[a]-x[b])+abs(y[a]-y[b]);
  queue<int> Q;
  Q.push(a);
  Q.push(b);
  jikued[a] = jikued[b] = true;
  while(!Q.empty()){
    int p = Q.front(); Q.pop();
    int xx = x[p];
    int yy = y[p];
    queue<int> ADD;
    {
      // x+y-d
      auto it = sum[xx+yy-dis].lower_bound(pii(xx-dis,-1));
      while(it!=sum[xx+yy-dis].end()){
        if(it->first > xx)break;
        ADD.push(it->second);
        it++;
      }
    }
    {
      auto it = sum[xx+yy+dis].lower_bound(pii(xx,-1));
      while(it!=sum[xx+yy+dis].end()){
        if(it->first > xx+dis)break;
        ADD.push(it->second);
        it++;
      }
    }
    {
      auto it = sub[xx-yy-dis].lower_bound(pii(xx-dis,-1));
      while(it!=sub[xx-yy-dis].end()){
        if(it->first > xx)break;
        ADD.push(it->second);
        it++;
      }
    }
    {
      auto it = sub[xx-yy+dis].lower_bound(pii(xx,-1));
      while(it!=sub[xx-yy+dis].end()){
        if(it->first > xx+dis)break;
        ADD.push(it->second);
        it++;
      }
    }
    while(!ADD.empty()){
      int q = ADD.front(); ADD.pop();
      if(jikued[q])continue;
      jikued[q] = true;
      int xxx = x[q];
      int yyy = y[q];
      sum[xxx+yyy].erase(sum[xxx+yyy].find(pii(xxx,q)));
      sub[xxx-yyy].erase(sub[xxx-yyy].find(pii(xxx,q)));
      Q.push(q);
    }
  }
  // REP(i,n)if(jikued[i])DEBUG(i);

  // get all combination
  sum.clear();
  sub.clear();
  REP(i,n){
    sum[x[i]+y[i]].insert(pii(x[i],i));
    sub[x[i]-y[i]].insert(pii(x[i],i));
  }
  for(auto P: sum){
    int id = P.first;
    int p = 0;
    ruisum[id][-125252] = 0;
    for(auto Z: P.second){
      int xx = Z.first;
      p++;
      ruisum[id][xx] = p;
    }
  }
  for(auto P: sub){
    int id = P.first;
    int p = 0;
    ruisub[id][-125252] = 0;
    for(auto Z: P.second){
      int xx = Z.first;
      p++;
      ruisub[id][xx] = p;
    }
  }
  ll ans = 0;
  REP(i,n){
    if(!jikued[i])continue;
    int xx = x[i];
    int yy = y[i];
    if(ruisum[xx+yy-dis].size()){
      auto it = ruisum[xx+yy-dis].upper_bound(xx);
      it--;
      ans += it->second;
      it = ruisum[xx+yy-dis].lower_bound(xx-dis);
      it--;
      ans -= it->second;
    }
    if(ruisum[xx+yy+dis].size()){
      auto it = ruisum[xx+yy+dis].upper_bound(xx+dis);
      it--;
      ans += it->second;
      it = ruisum[xx+yy+dis].lower_bound(xx+1);
      it--;
      ans -= it->second;
    }
    if(ruisub[xx-yy-dis].size()){
      auto it = ruisub[xx-yy-dis].upper_bound(xx);
      it--;
      ans += it->second;
      it = ruisub[xx-yy-dis].lower_bound(xx-dis+1);
      it--;
      ans -= it->second;
    }
    if(ruisub[xx-yy+dis].size()){
      auto it = ruisub[xx-yy+dis].upper_bound(xx+dis-1);
      it--;
      ans += it->second;
      it = ruisub[xx-yy+dis].lower_bound(xx+1);
      it--;
      ans -= it->second;
    }
  }
  // DEBUG(ans);
  printf("%lld\n",ans/2);
  return 0;
}


Measured memory_bytes: 79232