#include <bits/stdc++.h>
#define GET_MACRO(_1,_2,_3,_4,_5,NAME,...) NAME
#define pr(...) GET_MACRO(__VA_ARGS__,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__)
#define pr1(a) (#a)<<"="<<(a)
#define pr2(a,b) pr1(a)<<", "<<pr1(b)
#define pr3(a,b,c) pr2(a,b)<<", "<<pr1(c)
#define pr4(a,b,c,d) pr3(a,b,c)<<", "<<pr1(d)
#define pr5(a,b,c,d,e) pr4(a,b,c,d)<<", "<<pr1(e)
#define int long long
#define double long double
using namespace std;
const int N = 100010;
const int INF = 1LL<<55;
const int mod = (1e9)+7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
typedef pair<int,int> P;
typedef long long ll;
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
ostream& operator<<(ostream& o,P p){return o<<"("<<p.first<<","<<p.second<<")";}
istream& operator>>(istream& i,P &p){return i>>p.first>>p.second;}
ostream& operator<<(ostream& o,vector<auto> &a){int i=0;for(auto t:a)o<<(i++?" ":"")<<t;return o;}
istream& operator>>(istream& i,vector<auto> &a){for(auto &t:a)i>>t;return i;}
void prArr(auto a,string s=" "){int i=0;for(auto t:a)cout<<(i++?s:"")<<t;cout<<endl;}

int n;
vector<int> X,Y,U,V;
unordered_map<int,set<int> > SX,SY;
unordered_map<int,vector<int> > VX,VY;

int calc(int x,int y,int d){
  queue<P> Q;
  Q.push(P(x,y));
  SX[y].erase(x);
  SY[x].erase(y);
 
  int res = 0;
  while(!Q.empty()){
    auto t = Q.front(); Q.pop();
    int x = t.first;
    int y = t.second;
    {
      auto &a = VX[y+d];
      int num = lower_bound(a.begin(),a.end(),x-d) - upper_bound(a.begin(),a.end(),x+d);
      num *= -1;
      res += num;
    }

    {
      auto &a = VX[y-d];
      int num = lower_bound(a.begin(),a.end(),x-d) - upper_bound(a.begin(),a.end(),x+d);
      num *= -1;
      res += num;
    }

    {
      auto &a = VY[x-d];
      int num = lower_bound(a.begin(),a.end(),y-d+1) - lower_bound(a.begin(),a.end(),y+d);
      num *= -1;
      res += num;
    }

    {
      auto &a = VY[x+d];
      int num = lower_bound(a.begin(),a.end(),y-d+1) - lower_bound(a.begin(),a.end(),y+d);
      num *= -1;
      res += num;
    }

    {
      auto &a = SX[y+d];
      auto it = a.lower_bound(x-d);
      while(it != a.end() && *it <= x+d){
        auto tmp = it; tmp++;
        Q.push(P(*it,y+d));
        SY[*it].erase(y+d);
        a.erase(it);
        it = tmp;
      }
    }

    {
      auto &a = SX[y-d];
      auto it = a.lower_bound(x-d);
      while(it != a.end() && *it <= x+d){
        auto tmp = it; tmp++;
        Q.push(P(*it,y-d));
        SY[*it].erase(y-d);
        a.erase(it);
        it = tmp;
      }
    }

    {
      auto &a = SY[x+d];
      auto it = a.lower_bound(y-d+1);
      while(it != a.end() && *it <= y+d-1){
        auto tmp = it; tmp++;
        Q.push(P(x+d,*it));
        SX[*it].erase(x+d);
        a.erase(it);
        it = tmp;
      }
    }
    
    {
      auto &a = SY[x-d];
      auto it = a.lower_bound(y-d+1);
      while(it != a.end() && *it <= y+d-1){
        auto tmp = it; tmp++;
        Q.push(P(x-d,*it));
        SX[*it].erase(x-d);
        a.erase(it);
        it = tmp;
      }
    }
  }
  return res;
}

signed main(){
  int a,b;
  cin>>n>>a>>b; a--,b--;
  X.resize(n),Y.resize(n);
  U.resize(n),V.resize(n);
  for(int i=0;i<n;i++){
    int x,y;
    cin>>x>>y;
    X[i] = x;
    Y[i] = y;
    U[i] = x - y;
    V[i] = x + y;
  }

  for(int i=0;i<n;i++){
    SX[V[i]].insert(U[i]);
    SY[U[i]].insert(V[i]);
    VX[V[i]].push_back(U[i]);
    VY[U[i]].push_back(V[i]);
  }

  for(auto &a:VX) sort(a.second.begin(),a.second.end());
  for(auto &a:VY) sort(a.second.begin(),a.second.end());
  
  int d = max(abs(U[a]-U[b]), abs(V[a]-V[b]));
  int ans = calc(U[a],V[a],d);
  //  cout<<pr(P(U[a],V[a]), P(U[b],V[b]))<<endl;
  cout<<ans/2<<endl;
  return 0;
}


Measured memory_bytes: 63636