#include<bits/stdc++.h>
typedef long long ll;
using namespace std;

struct coord {ll x, y;};

ll dist (coord &A, coord &B) {
    return max(abs(A.x - B.x), abs(A.y - B.y));
}

ll n, s, e, d, par[100005], ans[100005], sex;
coord a[100005], c[100005];
vector<ll> xcpr, ycpr, cp[100005];
vector<pair<ll,ll> > xs[100005], ys[100005];

ll Find (ll cur) {
    if(par[cur] == cur) return cur;
    return par[cur] = Find(par[cur]);
}

void Union (ll A, ll B) {
    A = Find(A); B = Find(B);
    if(A == B) return;
    if(cp[A].size() < cp[B].size()) swap(A, B);
    for(int i=0;i<cp[B].size();i++) {
        cp[A].push_back(cp[B][i]);
    }
    cp[B].clear();
    par[B] = A;
}

void calc1 (vector<pair<ll,ll> > &A, vector<pair<ll,ll> > &B) {
    ll idx = 0;
    deque<ll> dq;
    for(int i=0;i<A.size();i++) {
        while(idx < B.size() && B[idx].first <= A[i].first + d) {
            dq.push_back(B[idx].first); idx++;
        }
        while(!dq.empty() && dq.front() < A[i].first - d) dq.pop_front();
        ans[A[i].second] += dq.size();
    }
}

void calc2 (vector<pair<ll,ll> > &A, vector<pair<ll,ll> > &B) {
    ll idx = 0;
    deque<ll> dq;
    for(int i=0;i<A.size();i++) {
        while(idx < B.size() && B[idx].first < A[i].first + d) {
            dq.push_back(B[idx].first); idx++;
        }
        while(!dq.empty() && dq.front() <= A[i].first - d) dq.pop_front();
        ans[A[i].second] += dq.size();
    }
}

void solve (vector<pair<ll,ll> > &A, vector<pair<ll,ll> > &B) {
    ll idx = 0;
    deque<pair<ll,ll> > dq;
    for(int i=0;i<A.size();i++) {
        while(idx < B.size() && B[idx].first <= A[i].first + d) {
            dq.push_back(B[idx]); idx++;
        }
        while(!dq.empty() && dq.front().first < A[i].first - d) dq.pop_front();
        while(dq.size() > 1) {
            Union(A[i].second, dq.front().second);
            dq.pop_front();
        }
        if(!dq.empty()) Union(A[i].second, dq.front().second);
    }
}

int main()
{
    scanf("%lld%lld%lld",&n,&s,&e);
    for(int i=1;i<=n;i++) {
        scanf("%lld%lld",&a[i].x,&a[i].y);
        a[i].x = a[i].x - a[i].y;
        a[i].y = a[i].x + 2*a[i].y;
        xcpr.push_back(a[i].x);
        ycpr.push_back(a[i].y);
    }
    sort(xcpr.begin(), xcpr.end());
    xcpr.erase(unique(xcpr.begin(),xcpr.end()),xcpr.end());
    sort(ycpr.begin(), ycpr.end());
    ycpr.erase(unique(ycpr.begin(),ycpr.end()),ycpr.end());
    for(int i=1;i<=n;i++) {
        c[i].x = lower_bound(xcpr.begin(), xcpr.end(), a[i].x) - xcpr.begin();
        c[i].y = lower_bound(ycpr.begin(), ycpr.end(), a[i].y) - ycpr.begin();
        xs[c[i].x].push_back({a[i].y, i});
        ys[c[i].y].push_back({a[i].x, i});
    }
    d = dist(a[s], a[e]);
    for(int i=1;i<=n;i++) {
        par[i] = i;
        cp[i].push_back(i);
    }
    int S = 0, E = 0;
    while(E<xcpr.size()) {
        if(xcpr[E] - xcpr[S] >= d) {
            if(xcpr[E] - xcpr[S] == d) {
                sort(xs[S].begin(), xs[S].end());
                sort(xs[E].begin(), xs[E].end());
                calc1(xs[E], xs[S]);
                calc1(xs[S], xs[E]);
                solve(xs[S], xs[E]);
            } S++;
        }
        else E++;
    }
    S = 0, E = 0;
    while(E<ycpr.size()) {
        if(ycpr[E] - ycpr[S] >= d) {
            if(ycpr[E] - ycpr[S] == d) {
                sort(ys[S].begin(), ys[S].end());
                sort(ys[E].begin(), ys[E].end());
                calc2(ys[E], ys[S]);
                calc2(ys[S], ys[E]);
                solve(ys[S], ys[E]);
            } S++;
        }
        else E++;
    }
    s = Find(s);
    for(int i=0;i<cp[s].size();i++) {
        sex += ans[cp[s][i]];
    }
    printf("%lld\n",sex/2);
}



Measured memory_bytes: 27628