#include <bits/stdc++.h>
     
    #define x first
    #define y second
     
    using namespace std;
     
    typedef long long ll;
    typedef pair<ll,ll> pll;
    typedef pair<ll,int> pli;
    int n, a, b;
    ll d;
    pll arr[100100];
    ll num[100100];
    vector<pli> lx[100100], ly[100100];
    vector<int> nx[100100], ny[100100];
    vector<ll> cx, cy;
     
    int loc(ll val, const vector<ll> &cx) {
        int idx = lower_bound(cx.begin(),cx.end(),val)-cx.begin();
        return (idx==cx.size()||cx[idx]!=val)?-1:idx;
    }
     
    int uloc(ll val, const vector<pli> &cx) {
        return upper_bound(cx.begin(),cx.end(),pli(val,987654321))-cx.begin();
    }
    int lloc(ll val, const vector<pli> &cx) {
        return lower_bound(cx.begin(),cx.end(),pli(val,-987654321))-cx.begin();
    }
     
    ll mabs(ll a) {return a<0?-a:a;}
    ll dis(pll a, pll b) {return max(mabs(a.x-b.x),mabs(a.y-b.y));}
     
    ll res = 0;
    bool visit[100100];
    int nxt(int a, const vector<pli> &lx, vector<int> &nx) {
        if (a==-1||a>=nx.size()||!visit[lx[a].second]) return a;
        return nx[a] = nxt(nx[a],lx,nx);
    }
     
    int main() {
        int i, j;
     
        scanf("%d%d%d",&n,&a,&b); --a; --b;
        for (i=0;i<n;i++) {
            ll x, y;
            scanf("%lld%lld",&x,&y);
            arr[i] = pll(x+y,x-y);
            cx.push_back(x+y); cy.push_back(x-y);
        }
        sort(cx.begin(),cx.end());
        cx.erase(unique(cx.begin(),cx.end()),cx.end());
        sort(cy.begin(),cy.end());
        cy.erase(unique(cy.begin(),cy.end()),cy.end());
        d = dis(arr[a],arr[b]);
        for (i=0;i<n;i++) {
            lx[loc(arr[i].x,cx)].push_back({arr[i].y,i});
            ly[loc(arr[i].y,cy)].push_back({arr[i].x,i});
        }
     
        for (i=0;i<cx.size();i++) {
            sort(lx[i].begin(),lx[i].end());
            nx[i].resize(lx[i].size());
            iota(nx[i].begin(),nx[i].end(),1);
            if (!nx[i].empty()) nx[i].back() = -1;
        }
        for (i=0;i<cy.size();i++) {
            sort(ly[i].begin(),ly[i].end());
            ny[i].resize(ly[i].size());
            iota(ny[i].begin(),ny[i].end(),1);
            if (!ny[i].empty()) ny[i].back() = -1;
        }
     
        for (i=0;i<n;i++) {
            int idx, l, r;
            idx = loc(arr[i].x+d,cx);
            if (idx>=0) {
                l = uloc(arr[i].y-d,lx[idx]), r = uloc(arr[i].y+d,lx[idx]);
                num[i] += r-l;
            }
            idx = loc(arr[i].x-d,cx);
            if (idx>=0) {
                l = lloc(arr[i].y-d,lx[idx]), r = lloc(arr[i].y+d,lx[idx]);
                num[i] += r-l;
            }
            idx = loc(arr[i].y+d,cy);
            if (idx>=0) {
                l = lloc(arr[i].x-d,ly[idx]), r = lloc(arr[i].x+d,ly[idx]);
                num[i] += r-l;
            }
            idx = loc(arr[i].y-d,cy);
            if (idx>=0) {
                l = uloc(arr[i].x-d,ly[idx]), r = uloc(arr[i].x+d,ly[idx]);
                num[i] += r-l;
            }
        }
     
        queue<int> q;
        q.push(a);
        visit[a] = 1;
        while(!q.empty()) {
            int idx; i = q.front();
            q.pop();
            idx = loc(arr[i].x+d,cx);
            if (idx>=0) {
                for (j=nxt(lloc(arr[i].y-d,lx[idx]),lx[idx],nx[idx]);j!=-1&&j<lx[idx].size()&&lx[idx][j].first<=arr[i].y+d;j=nxt(j,lx[idx],nx[idx])) {
                    visit[lx[idx][j].second] = 1;
                    q.push(lx[idx][j].second);
                }
            }
            idx = loc(arr[i].x-d,cx);
            if (idx>=0) {
                for (j=nxt(lloc(arr[i].y-d,lx[idx]),lx[idx],nx[idx]);j!=-1&&j<lx[idx].size()&&lx[idx][j].first<=arr[i].y+d;j=nxt(j,lx[idx],nx[idx])) {
                    visit[lx[idx][j].second] = 1;
                    q.push(lx[idx][j].second); 
                }
            }
            idx = loc(arr[i].y+d,cy);
            if (idx>=0) {
                for (j=nxt(lloc(arr[i].x-d,ly[idx]),ly[idx],ny[idx]);j!=-1&&j<ly[idx].size()&&ly[idx][j].first<=arr[i].x+d;j=nxt(j,ly[idx],ny[idx])) {
                    visit[ly[idx][j].second] = 1;
                    q.push(ly[idx][j].second); 
                }
            }
            idx = loc(arr[i].y-d,cy);
            if (idx>=0) {
                for (j=nxt(lloc(arr[i].x-d,ly[idx]),ly[idx],ny[idx]);j!=-1&&j<ly[idx].size()&&ly[idx][j].first<=arr[i].x+d;j=nxt(j,ly[idx],ny[idx])) {
                    visit[ly[idx][j].second] = 1;
                    q.push(ly[idx][j].second);
                }
            }
        }
     
        for (i=0;i<n;i++) {
            if (!visit[i]) continue;
            res += num[i];
        }
        printf("%lld\n",res/2);
     
        return 0;
    }

Measured memory_bytes: 24940