#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define fin "\n"


#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)

template <typename T>
inline void chmin(T &l,T r){l=min(l,r);}

template <typename T>
inline void chmax(T &l,T r){l=max(l,r);}

template <typename T>
istream& operator>>(istream &is,vector<T> &v){
    for(auto &it:v)is>>it;
    return is;
}

int main(){
    int N,a,b;
    cin>>N;
    cin>>a>>b;
    a--,b--;

    map<LL,map<LL,int>> p,q;
    vector<LL> x(N),y(N);
    LL res=0;
    REP(i,N){
        cin>>x[i]>>y[i];
        p[x[i]+y[i]][x[i]-y[i]]=i;
        q[x[i]-y[i]][x[i]+y[i]]=i;
    }
    LL D=abs(x[a]-x[b])+abs(y[a]-y[b]);
    vector<int> used(N,0);
    used[a]=used[b]=1;

    {
        auto P=p;
        auto Q=q;
        queue<int> que;
        que.push(a);
        que.push(b);
        P[x[a]+y[a]].erase(x[a]-y[a]);
        P[x[b]+y[b]].erase(x[b]-y[b]);
        Q[x[a]-y[a]].erase(x[a]+y[a]);
        Q[x[b]-y[b]].erase(x[b]+y[b]);
        
        while(que.size()){
            int v=que.front();que.pop();
            //cout<<v<<endl;
            queue<int> dq;
            {
                LL X=x[v]+y[v];
                LL Y=x[v]-y[v];
                auto &R=P[X+D];
                for(auto it=R.lower_bound(Y-D);
                    it!=R.end()&&it->first<=Y+D;++it)
                    dq.push(it->second);
            }
            {
                LL X=x[v]+y[v];
                LL Y=x[v]-y[v];
                auto &R=P[X-D];
                for(auto it=R.lower_bound(Y-D);
                    it!=R.end()&&it->first<=Y+D;++it)
                    dq.push(it->second);
            }
            {
                LL X=x[v]-y[v];
                LL Y=x[v]+y[v];
                auto &R=Q[X+D];
                for(auto it=R.lower_bound(Y-D);
                    it!=R.end()&&it->first<=Y+D;++it)
                    dq.push(it->second);
            }
            {
                LL X=x[v]-y[v];
                LL Y=x[v]+y[v];
                auto &R=Q[X-D];
                for(auto it=R.lower_bound(Y-D);
                    it!=R.end()&&it->first<=Y+D;++it)
                    dq.push(it->second);
            }
            while(dq.size()){
                int u=dq.front();dq.pop();
                if(used[u]==0){
                    P[x[u]+y[u]].erase(x[u]-y[u]);
                    Q[x[u]-y[u]].erase(x[u]+y[u]);
                    used[u]=1;
                    que.push(u);
                }
            }
        }
        
    }
    const LL INF=1e13;
    {
        for(auto &it:p){
            int cnt=0;
            for(auto &jt:it.second)jt.second=cnt++;
            it.second[INF]=cnt++;
        }
        for(auto &it:q){
            int cnt=0;
            for(auto &jt:it.second)jt.second=cnt++;
            it.second[INF]=cnt++;
        }
    }
    REP(v,N)if(used[v]){
        {
            LL X=x[v]+y[v];
            LL Y=x[v]-y[v];
            auto &R=p[X+D];
            res+=(R.lower_bound(Y+D))->second-(R.upper_bound(Y-D))->second;
        }
        {
            LL X=x[v]+y[v];
            LL Y=x[v]-y[v];
            auto &R=p[X-D];
            res+=(R.lower_bound(Y+D))->second-(R.upper_bound(Y-D))->second;
        }
        {
            LL X=x[v]-y[v];
            LL Y=x[v]+y[v];
            auto &R=q[X+D];
            res+=(R.lower_bound(Y+D))->second-(R.upper_bound(Y-D))->second;
        }
        {
            LL X=x[v]-y[v];
            LL Y=x[v]+y[v];
            auto &R=q[X-D];
            res+=(R.lower_bound(Y+D))->second-(R.upper_bound(Y-D))->second;
        }
        res+=p[x[v]+y[v]+D].count(x[v]-y[v]+D);
        res+=p[x[v]+y[v]+D].count(x[v]-y[v]-D);
        res+=p[x[v]+y[v]-D].count(x[v]-y[v]+D);
        res+=p[x[v]+y[v]-D].count(x[v]-y[v]-D);
    }
    cout<<res/2<<endl;
    
    return 0;
}


Measured memory_bytes: 76032