#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FORR(i,a,b) for (int i=(a);i>=(b);i--)
#define pb push_back
#define pcnt __builtin_popcount
#define show(x) cout<<#x<<" = "<<x<<endl;
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define fi first
#define se second
#define rng(a) (a.begin()),(a.end())
#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define sz(x) (int)(x).size()
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef set<int> si;
typedef pair<ll,ll> pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pll> vpll;
typedef set<ll> sl;
typedef __int128_t lll;
typedef pair<lll,lll> plll;
typedef vector<lll> vlll;
template<typename T>string join(vector<T>&v)
{stringstream s;FOR(i,0,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename A, size_t N, typename T>void Fill(A (&array)[N], const T&v)
{fill((T*)array,(T*)(array+N),v);}
lll gcd(lll a,lll b,lll &x,lll &y){if(!b){x=1;y=0;return a;}lll d=gcd(b,a%b,y,x);y-=a/b*x;return d;}
ll gcd(ll a,ll b){lll x=0,y=0; return gcd(a, b, x, y);}
ll modpow(lll a,lll n,ll m){if(a==0)return a;lll p=1;for(;n>0;n/=2,a=a*a%m)if(n&1)p=p*a%m;return(ll)p;}
void dout(double d){printf("%.12f\n",d);}

const int iinf = 1e9;
const ll linf = 1e18;
const int mod = 1e9+7;
const double pi = acos(-1);
const double eps = 1e-10;
const int N = 1e5;
ll n, a, b, d;
map<ll, sl> p, m;
map<ll, vl> pp, mm;
pll s, t;
queue<pll> q, tmp, tmp2;
set<pll> y;
int lb(vl&v, ll i){
  int l = -1, r = sz(v), mid;
  while(r-l>1){
    mid = (l+r)/2;
    if(v[mid] < i){
      l = mid;
    }else{
      r = mid;
    }
  }
  return r;
}
main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> a >> b;
  FOR(i, 1, n+1){
    ll x, y;
    cin >> x >> y;
    p[x+y].insert(x);
    m[x-y].insert(x);
    pp[x+y].pb(x);
    mm[x-y].pb(x);
    if(i == a) s = mp(x, y);
    if(i == b) t = mp(x, y);
  }
  each(itr, pp) sort(rng(itr->se));
  each(itr, mm) sort(rng(itr->se));
  d = abs(s.fi-t.fi) + abs(s.se-t.se);

  q.push(s);
  p[s.fi+s.se].erase(s.fi);
  m[s.fi-s.se].erase(s.fi);
  while(!q.empty()){
    while(!q.empty()){
      pll tt = q.front();
      q.pop();
      y.insert(tt);
      ll k, _x = tt.fi, _y = tt.se;
      k = _x+_y+d; for(sl::iterator itr = p[k].lower_bound(_x    ); itr != p[k].upper_bound(_x+d-1); itr ++) tmp.push(mp(*itr, _y+_x+d-*itr));
      k = _x+_y-d; for(sl::iterator itr = p[k].lower_bound(_x-d+1); itr != p[k].upper_bound(_x    ); itr ++) tmp.push(mp(*itr, _y+_x-d-*itr));
      k = _x-_y+d; for(sl::iterator itr = m[k].lower_bound(_x+1  ); itr != m[k].upper_bound(_x+d  ); itr ++) tmp.push(mp(*itr, _y-_x-d+*itr));
      k = _x-_y-d; for(sl::iterator itr = m[k].lower_bound(_x-d  ); itr != m[k].upper_bound(_x-1  ); itr ++) tmp.push(mp(*itr, _y-_x+d+*itr));
      while(!tmp.empty()){
        pll ttt = tmp.front();
        tmp.pop();
        tmp2.push(ttt);
        ll __x = ttt.fi, __y = ttt.se;
        p[__x+__y].erase(__x);
        m[__x-__y].erase(__x);
      }
    }
    swap(q, tmp2);
  }

  ll ans = 0;
  each(itr, y){
    ll k, _x = itr->fi, _y = itr->se;
    k = _x+_y+d;
    ans += lb(pp[k], _x+d) - lb(pp[k], _x);
    k = _x-_y+d;
    ans += lb(mm[k], _x+d+1) - lb(mm[k], _x+1);
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 76672