#include<bits/stdc++.h>


#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define len(x) (int)(x).size()
#define mkp make_pair
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int N = (int)1e5 + 10 , inf = 2e9;
map < int , set<pii> > sum , sub;
map < pii , int > ind;
map < int , vector<pii> > cntsum , cntsub;
pii dots[N];
vector<pii> dir = {{0,+1},{0,-1},{-1,0},{1,0}};
void add(int ind){
    sum[dots[ind].fi + dots[ind].se].insert(dots[ind]);
    sub[dots[ind].fi - dots[ind].se].insert(dots[ind]);
    cntsum[dots[ind].fi + dots[ind].se].push_back(dots[ind]);
    cntsub[dots[ind].fi - dots[ind].se].push_back(dots[ind]);
}
void del(pii dot){
    sum[dot.fi + dot.se].erase(dot);
    sub[dot.fi - dot.se].erase(dot);
}
bool used[N];



void dfs(int v, int D){
    /// if we found okay
    /// firstly we need to find top
    used[v] = 1;
    for(pii top : {mkp(dots[v].fi, dots[v].se + D) , mkp(dots[v].fi - D , dots[v].se)})
        while(true){
            auto it = sum[top.fi + top.se].lower_bound(top);
            if(it != sum[top.fi+top.se].end() && (*(it)).fi - top.fi <= D){
                int u = ind[*it];
                del(*it);
                if(!used[u])
                dfs(u , D);
            }else
                break;
        }
    for(pii top : {mkp(dots[v].fi-D,dots[v].se),mkp(dots[v].fi,dots[v].se-D)})
        while(true){
            auto it = sub[top.fi-top.se].lower_bound(top);
            if(it != sub[top.fi-top.se].end() && (*(it)).fi - top.fi <= D){
                int u = ind[*it];
                del(*it);
                if(!used[u])
                dfs(u , D);
            }else
                break;
        }
}
signed main(){
    int n , a , b;cin >> n  >> a >> b;
    for(int i = 0 ; i < n; ++i)
        cin >> dots[i].fi >> dots[i].se;
    --a , --b;
    int D = abs(dots[a].fi-dots[b].fi) + abs(dots[a].se-dots[b].se);
    for(int i = 0 ; i < n; ++i)
        add(i);
    for(auto &i : cntsum)
        sort(all(i.se));
    for(auto &i : cntsub)
        sort(all(i.se));
    for(int i = 0 ; i < n; ++i){
        ind[dots[i]] = i;
    }


    /// calculate
    vector<int>have(n);




    for(int i = 0 ; i  < n; ++i){
        /// we wonder to calculate cnt of good dots
//        cout << " I " << i << '\n';
        for(auto top : {mkp(dots[i].fi,dots[i].se+D),mkp(dots[i].fi-D,dots[i].se)}){
            int Sum = top.fi + top.se;
            int cur = lower_bound(all(cntsum[Sum]) , mkp(top.fi + D + 1, -inf)) -  lower_bound(all(cntsum[Sum]) , top);
            have[i] += cur;
        }
        /// for sub
        for(auto top : {mkp(dots[i].fi-D,dots[i].se),mkp(dots[i].fi,dots[i].se-D)}){
            int Sub = top.fi - top.se;
            int cur = lower_bound(all(cntsub[Sub]) , mkp(top.fi+D+1, -inf)) - lower_bound(all(cntsub[Sub]) , top);

            have[i] += cur;
        }
        for(auto u : dir){
            if(ind.find(mkp(dots[i].fi+D*u.fi,dots[i].se+D*u.se))!=ind.end())
                have[i]--;
        }
    }

    /// check it out
//    for(int i = 0 ; i < n; ++i)
//        cout << have[i] << '\n';
//    cout << " TRUE \n";
//    for(int i = 0 ; i < n; ++i){
//        int cur = 0;
//        for(int j = 0; j < n; ++j){
//            if(i != j&&abs(dots[j].fi-dots[i].fi)+abs(dots[j].se-dots[i].se)==D){
//                cur++;
//            }
//        }
//        cout << cur << '\n';
//    }
//    system("pause");
    dfs(a , D);
    ll answer = 0;

    for(int i = 0 ; i < n; ++i){
        if(used[i]){
            answer += have[i];
        }
    }
//    for(int i = 0 ; i < n; ++i)
//        cout << used[i] << '\n';
    cout << answer  / 2<< '\n';
    return 0;

}


Measured memory_bytes: 98760