#include <bits/stdc++.h>
 
using namespace std;
 
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl;
#define DEBUG_MAT(v) cerr<<#v<<endl;for(int i=0;i<v.size();i++){for(int j=0;j<v[i].size();j++) {cerr<<v[i][j]<<" ";}cerr<<endl;}
typedef long long ll;
// #define int ll
 
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
template<class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); }
template<class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); }
template<class S, class T> ostream& operator<<(ostream& os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
#define X first
#define Y second
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(int)(n);i>0;i--)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define in(x, a, b) (a <= x && x < b)
#define all(c) c.begin(),c.end()
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; }
#define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end());
const ll inf = 1000000001;
const ll INF = (ll)1e18 + 1;
const long double pi = 3.1415926535897932384626433832795028841971L;
#define Sp(p) cout<<setprecision(25)<< fixed<<p<<endl;
// int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
// int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
vi dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
// vi dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };
#define fio() cin.tie(0); ios::sync_with_stdio(false);
const ll MOD = 1000000007;
// const ll MOD = 998244353;
// #define mp make_pair
//#define endl '\n'



class UnionFind {
public:
  int n;
  vi par; //�e
  vi ran; //�؂̐[��
  vi num; //�v�f��
  int g; // group��
 
  UnionFind(int _n) {
    n = _n;
    g = n;
    par.resize(n); ran.resize(n); num.resize(n);
    for (int i = 0; i < n; i++) {
      par[i] = i; ran[i] = 0; num[i] = 1;
    }
  }
 
  //�؂̍������߂�
  int find(int x) {
    if (par[x] == x) {
      return x;
    }
    else {
      return par[x] = find(par[x]);
    }
  }
 
  //x��y�̑�����W���𕹍�
  void unite(int x, int y) {
    x = find(x); y = find(y);
    int numsum = num[x] + num[y];
    if (x == y) {
      return;
    }
    if (ran[x]<ran[y]) {
      par[x] = y;
    }
    else {
      par[y] = x;
      if (ran[x] == ran[y]) {
        ran[x]++;
      }
    }
    num[x] = num[y] = numsum;
    g--;
  }
 
  //x��y�������W���ɑ����邩�ۂ�
  bool same(int x, int y) {
    return find(x) == find(y);
  }
 
};


signed main() {
    fio();
    vi temp(0);

    int n, a, b;
    cin >> n >> a >> b;
    a--; b--;


    vector<pii> xy(n);
    rep (i, n) {
        cin >> xy[i].first >> xy[i].second;
        ll xx = xy[i].first + xy[i].second;
        ll yy = xy[i].first - xy[i].second;
        xy[i] = pll(xx, yy);
    }

    map<int, set<int>> x2y, y2x;
    map<int, vector<int>> x2yy, y2xx;
    rep (i, n) {
        if (i != a and i != b) {
            x2y[xy[i].first].insert(xy[i].second);
            y2x[xy[i].second].insert(xy[i].first);
        }
        x2yy[xy[i].first].push_back(xy[i].second);
        y2xx[xy[i].second].push_back(xy[i].first);
    }
    for (auto itr = x2yy.begin(); itr != x2yy.end(); itr++) {
        // DEBUG(itr->first);
        sort(all(itr->second));
        // DEBUG_VEC(itr->second);
    }
    for (auto itr = y2xx.begin(); itr != y2xx.end(); itr++) {
        // DEBUG(itr->first);
        sort(all(itr->second));
        // DEBUG_VEC(itr->second);
    }

    ll d = max(abs(xy[a].first - xy[b].first), abs(xy[a].second - xy[b].second));
    // DEBUG(d);

    // DEBUG_VEC(xy);
    queue<pll> qu;
    qu.push(xy[a]);
    qu.push(xy[b]);

    ll ans = 0;
    while (qu.size() > 0) {
        pll xxyy = qu.front();
        qu.pop();
        // DEBUG(xxyy);

        ll y = xxyy.second, x = xxyy.first;

        ll nx = x - d;
        auto itr = x2y[nx].lower_bound(y - d);
        while (itr != x2y[nx].end() and *itr <= y + d) {
            ll ny = *itr;
            qu.push(pll(nx, ny));
            // DEBUG(pll(nx, ny));
            x2y[nx].erase(ny);
            y2x[ny].erase(nx);

            itr = x2y[nx].lower_bound(y - d);
        }
        // DEBUG(nx);
        // DEBUG_VEC(x2yy[nx]);
        if (x2yy.count(nx) != 0) {
            // ans += lower_bound(all(x2yy[nx]), y + d + 1) - lower_bound(all(x2yy[nx]), y - d);
            ans += lower_bound(all(x2yy[nx]), y + d + 1) - lower_bound(all(x2yy[nx]), y - d);
        }
        // DEBUG(ans);

        nx = x + d;
        itr = x2y[nx].lower_bound(y - d);
        while (itr != x2y[nx].end() and *itr <= y + d) {
            ll ny = *itr;
            qu.push(pll(nx, ny));
            // DEBUG(pll(nx, ny));
            x2y[nx].erase(ny);
            y2x[ny].erase(nx);

            itr = x2y[nx].lower_bound(y - d);
        }
        // DEBUG_VEC(x2yy[nx]);
        // DEBUG(nx);
        if (x2yy.count(nx) != 0) {
            ans += lower_bound(all(x2yy[nx]), y + d + 1) - lower_bound(all(x2yy[nx]), y - d);
        }
        // DEBUG(ans);

        ll ny = y - d;
        itr = y2x[ny].lower_bound(x - d);
        while (itr != y2x[ny].end() and *itr <= x + d) {
            ll nx = *itr;
            qu.push(pll(nx, ny));
            // DEBUG(pll(nx, ny));
            x2y[nx].erase(ny);
            y2x[ny].erase(nx);

            itr = y2x[ny].lower_bound(x - d);
        }
        // DEBUG(ny);
        // DEBUG_VEC(y2xx[ny]);
        if (y2xx.count(ny) != 0) {
            ans += upper_bound(all(y2xx[ny]), x + d - 1) - lower_bound(all(y2xx[ny]), x - d + 1);
        }
        // DEBUG(ans);

        ny = y + d;
        itr = y2x[ny].lower_bound(x - d);
        while (itr != y2x[ny].end() and *itr <= x + d) {
            ll nx = *itr;
            qu.push(pll(nx, ny));
            // DEBUG(pll(nx, ny));
            x2y[nx].erase(ny);
            y2x[ny].erase(nx);

            itr = y2x[ny].lower_bound(x - d);
        }
        // DEBUG(ny);
        // DEBUG_VEC(y2xx[ny]);

        if (y2xx.count(ny) != 0) {
            ans += upper_bound(all(y2xx[ny]), x + d - 1) - lower_bound(all(y2xx[ny]), x - d + 1);
        }
        // DEBUG(ans);
    }
    assert(ans % 2 == 0);
    cout << ans / 2 << endl;
}

Measured memory_bytes: 65896