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

#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define ppb pop_back()
#define ppf pop_front()
#define all(vec) vec.begin(), vec.end()
#define fol(i,a,b) for(int i=a;i<b;i++)
#define loop(i,a,b) for(int i=a;i>=b;i--)
#define forr(x,arr) for(auto& x:arr)
#define mod 1000000007
#define INF 0x3f3f3f3f3f3f3f3f
#define EPS 1e-7
#define sz(x) ((lli)(x).size())

using   lli     =   long long;
using   lld     =   long double;
using   ulli    =   unsigned long long int;
using   pll     =   pair<lli, lli>;
using   ttt     =   pair<lli, pll>;
using   vttt    =   vector<ttt>;
using   vll     =   vector<pll>;
using   vl      =   vector<lli>;
using   vi      =   vector<int>;
using   vvi     =   vector<vector<int>>;
using   cd      =   complex<lld>;
const double PI = acos(-1);

#ifndef tejasp
#define trace(...) {}
#define cotra(...) {}
#define end_routine() {}
#define localsys 0
#define endl '\n'
#endif

lli dist(pll a, pll b) {
    return max(abs(a.ff-b.ff),abs(a.ss-b.ss));
}

int tejas_919(int kkkk)
{
    lli n, m, k, q, a, b, u, v, temp=0, ans=0;
    cin>>n>>a>>b; a--; b--;
    vll vect(n);
    map<lli,set<pair<int,lli>>> mpx, mpy;
    map<lli,vector<lli>> mpvx, mpvy;
    fol(i,0,n)
    {
        cin>>u>>v;
        vect[i]=make_pair(u+v,u-v);
        mpx[vect[i].ff].insert({vect[i].ss,i});
        mpy[vect[i].ss].insert({vect[i].ff,i});
        mpvx[vect[i].ff].pb(vect[i].ss);
        mpvy[vect[i].ss].pb(vect[i].ff);
    }
    cotra(vect)
    lli di=dist(vect[a],vect[b]);
    trace(di)
    forr(x,mpvx) sort(all(x.ss));
    forr(x,mpvy) sort(all(x.ss));
    int vis[n+1]={};
    deque<int> de;
    de.pb(a);   de.pb(b); vis[a]=1; vis[b]=1;
    while(!de.empty())
    {
        // cotra(de)
        auto cur=de.front(); de.ppf;
        // trace(cur,vect[cur])
        if(mpvx.count(vect[cur].ff-di)>0)
        {
            auto vc = mpx.find(vect[cur].ff-di);
            {
                auto l  = vc->ss.lower_bound({vect[cur].ss-di,0});
                auto r  = vc->ss.lower_bound({vect[cur].ss+di+1,0});
                while(l!=r)
                {
                    auto t=l; l++;
                    if(vis[t->ss]==0) de.pb(t->ss);
                    vis[t->ss]=1;
                    vc->ss.erase(t);
                }
            }
            temp =  lower_bound(all(mpvx[vect[cur].ff-di]),vect[cur].ss+di+1)
                    -lower_bound(all(mpvx[vect[cur].ff-di]),vect[cur].ss-di);
            // trace(cur,temp)
            ans+=temp;
        }
        if(mpvx.count(vect[cur].ff+di)>0)
        {
            auto vc = mpx.find(vect[cur].ff+di);
            {
                auto l  = vc->ss.lower_bound({vect[cur].ss-di,0});
                auto r  = vc->ss.lower_bound({vect[cur].ss+di+1,0});
                // cotra(vc->ss)
                while(l!=r)
                {
                    auto t=l; l++;
                    if(vis[t->ss]==0) de.pb(t->ss);
                    vis[t->ss]=1;
                    vc->ss.erase(t);
                }
            }
            temp =  lower_bound(all(mpvx[vect[cur].ff+di]),vect[cur].ss+di+1)
                    -lower_bound(all(mpvx[vect[cur].ff+di]),vect[cur].ss-di);
            // trace(cur,temp)
            ans+=temp;
        }
        if(mpvy.count(vect[cur].ss-di)>0)
        {
            auto vc = mpy.find(vect[cur].ss-di);
            {
                auto l  = vc->ss.lower_bound({vect[cur].ff-di,0});
                auto r  = vc->ss.lower_bound({vect[cur].ff+di+1,0});
                while(l!=r)
                {
                    auto t=l; l++;
                    if(vis[t->ss]==0) de.pb(t->ss);
                    vis[t->ss]=1;
                    vc->ss.erase(t);
                }
            }
            temp =  lower_bound(all(mpvy[vect[cur].ss-di]),vect[cur].ff+di)
                    -lower_bound(all(mpvy[vect[cur].ss-di]),vect[cur].ff-di+1);
            // trace(cur,temp)
            ans+=temp;
        }
        if(mpvy.count(vect[cur].ss+di)>0)
        {
            auto vc = mpy.find(vect[cur].ss+di);
            {
                auto l  = vc->ss.lower_bound({vect[cur].ff-di,0});
                auto r  = vc->ss.lower_bound({vect[cur].ff+di+1,0});
                while(l!=r)
                {
                    auto t=l; l++;
                    if(vis[t->ss]==0) de.pb(t->ss);
                    vis[t->ss]=1;
                    vc->ss.erase(t);
                }
            }
            temp =  lower_bound(all(mpvy[vect[cur].ss+di]),vect[cur].ff+di)
                    -lower_bound(all(mpvy[vect[cur].ss+di]),vect[cur].ff-di+1);
            // trace(cur,temp)
            ans+=temp;
        }
    }
    ans/=2;
    cout<<ans<<endl;
    return 0;
}

signed main()
{
    #ifdef tejasp
            freopen("input.txt", "rt", stdin);
            freopen("output.txt", "wt", stdout);
    #endif
    if(!localsys) { ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); }
    cout << fixed << setprecision(10);
    int t=1;
    //cin>>t;
    fol(i,0,t) { tejas_919(i+1); }
    end_routine();
    if(localsys) system("pause");
}

Measured memory_bytes: 49920