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

#define rep(i,x,y) for(i64 i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

const int64_t inf=1e12;
const double eps=1e-6;

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
    	os << v << ",";
    }
    os << "]";
    return os;
}

using i64=int64_t;

pair<i64,i64> rotate45(i64 x,i64 y){
    return make_pair(x-y,x+y);
}

void solve(){
    i64 N,a,b;
    cin >> N >> a >> b;
    --a;
    --b;

    vector<i64> x(N),y(N);
    map<i64,set<pair<i64,i64>>> mpxy,mpyx;
    rep(i,0,N){
        cin >> x[i] >> y[i];
        auto p=rotate45(x[i],y[i]);
        x[i]=p.first;
        y[i]=p.second;
        if(i!=a){
            mpxy[x[i]].insert(make_pair(y[i],i));
            mpyx[y[i]].insert(make_pair(x[i],i));
        }
    }

    i64 d=max(abs(x[a]-x[b]),abs(y[a]-y[b]));
    vector<bool> done(N);
    vector<i64> s;
    queue<i64> que;
    que.push(a);
    done[a]=true;
    s.push_back(a);
    while(!que.empty()){
        i64 i=que.front();
        que.pop();
        {
            auto begin=mpxy[x[i]-d].lower_bound(make_pair(y[i]-d,-inf)),end=mpxy[x[i]-d].upper_bound(make_pair(y[i]+d,inf));
            for(auto it=begin; it!=end;){
                i64 j=it->second;
                assert(!done[j]);
                done[j]=true;
                que.push(j);
                s.push_back(j);
                mpyx[it->first].erase(make_pair(x[i]-d,j));
                mpxy[x[i]-d].erase(it++);
            }
        }
        {
            auto begin=mpxy[x[i]+d].lower_bound(make_pair(y[i]-d,-inf)),end=mpxy[x[i]+d].upper_bound(make_pair(y[i]+d,inf));
            for(auto it=begin; it!=end;){
                i64 j=it->second;
                assert(!done[j]);
                done[j]=true;
                que.push(j);
                s.push_back(j);
                mpyx[it->first].erase(make_pair(x[i]+d,j));
                mpxy[x[i]+d].erase(it++);
            }
        }
        {
            auto begin=mpyx[y[i]-d].lower_bound(make_pair(x[i]-d,-inf)),end=mpyx[y[i]-d].upper_bound(make_pair(x[i]+d,inf));
            for(auto it=begin; it!=end;){
                i64 j=it->second;
                assert(!done[j]);
                done[j]=true;
                que.push(j);
                s.push_back(j);
                mpxy[it->first].erase(make_pair(y[i]-d,j));
                mpyx[y[i]-d].erase(it++);
            }
        }
        {
            auto begin=mpyx[y[i]+d].lower_bound(make_pair(x[i]-d,-inf)),end=mpyx[y[i]+d].upper_bound(make_pair(x[i]+d,inf));
            for(auto it=begin; it!=end;){
                i64 j=it->second;
                assert(!done[j]);
                done[j]=true;
                que.push(j);
                s.push_back(j);
                mpxy[it->first].erase(make_pair(y[i]+d,j));
                mpyx[y[i]+d].erase(it++);
            }
        }
    }

    i64 ans=0;
    {
        map<i64,vector<i64>> mp;
        vector<pair<i64,i64>> ps;
        for(i64 i:s){
            mp[x[i]].push_back(y[i]);
            ps.push_back(make_pair(x[i],y[i]));
        }
        for(auto &p:mp) sort(p.second.begin(),p.second.end());
        for(auto &p:ps){
            if(mp.find(p.first-d)!=mp.end()){
                ans+=upper_bound(mp[p.first-d].begin(),mp[p.first-d].end(),p.second+d)-lower_bound(mp[p.first-d].begin(),mp[p.first-d].end(),p.second-d);
            }
            if(mp.find(p.first+d)!=mp.end())
                ans+=upper_bound(mp[p.first+d].begin(),mp[p.first+d].end(),p.second+d)-lower_bound(mp[p.first+d].begin(),mp[p.first+d].end(),p.second-d);
        }
    }
    {
        map<i64,vector<i64>> mp;
        vector<pair<i64,i64>> ps;
        for(i64 i:s){
            mp[y[i]].push_back(x[i]);
            ps.push_back(make_pair(y[i],x[i]));
        }
        for(auto &p:mp) sort(p.second.begin(),p.second.end());
        for(auto &p:ps){
            if(mp.find(p.first-d)!=mp.end())
                ans+=lower_bound(mp[p.first-d].begin(),mp[p.first-d].end(),p.second+d)-upper_bound(mp[p.first-d].begin(),mp[p.first-d].end(),p.second-d);
            if(mp.find(p.first+d)!=mp.end())
                ans+=lower_bound(mp[p.first+d].begin(),mp[p.first+d].end(),p.second+d)-upper_bound(mp[p.first+d].begin(),mp[p.first+d].end(),p.second-d);
        }
    }

    ans/=2;
    cout << ans << endl;
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(10);
    solve();
    return 0;
}


Measured memory_bytes: 57300