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

int N, A, B;
const int MAX = 100000;
int64_t X[MAX], Y[MAX], D;
typedef tuple<int64_t, int64_t, int64_t> Tuple;
typedef pair<int64_t, int64_t> Pair;
set<Tuple> stxy, styx;
vector<Pair> vxy, vyx;
bool use[MAX];

void dfs(int i){
    if(use[i]) return;
    use[i] = true;
    vector<int> js;
    for(auto x : {X[i]-D, X[i]+D}){
        auto it = stxy.lower_bound(make_tuple(x, Y[i]-D, 0));
        while(it != stxy.end() && (*it) <= make_tuple(x, Y[i]+D, N)){
            js.push_back(get<2>(*it));
            it = stxy.erase(it);
        }
    }
    for(auto y : {Y[i]-D, Y[i]+D}){
        auto it = styx.lower_bound(make_tuple(y, X[i]-D, 0));
        while(it != styx.end() && (*it) <= make_tuple(y, X[i]+D, N)){
            js.push_back(get<2>(*it));
            it = styx.erase(it);
        }
    }
    for(auto j : js){
        if(!use[j]) dfs(j);
    }
}

int main(){
    int64_t i, j, k;
    cin >> N >> A >> B;
    A--; B--;
    for(i=0; i<N; i++){
        int64_t x, y;
        cin >> x >> y;
        X[i] = x+y;
        Y[i] = x-y;
        if(i!=A){
            stxy.insert(make_tuple(X[i], Y[i], i));
            styx.insert(make_tuple(Y[i], X[i], i));
        }
        vxy.push_back({X[i], Y[i]});
        vyx.push_back({Y[i], X[i]});
    }
    sort(vxy.begin(), vxy.end());
    sort(vyx.begin(), vyx.end());
    D = max(abs(X[A]-X[B]), abs(Y[A]-Y[B]));
    dfs(A);

    int64_t ans = 0;
    for(i=0; i<N; i++){
        if(!use[i]) continue;
        for(auto x : {X[i]-D, X[i]+D}){
            ans += upper_bound(vxy.begin(), vxy.end(), make_pair(x, Y[i]+D)) - lower_bound(vxy.begin(), vxy.end(), make_pair(x, Y[i]-D));
        }
        for(auto y : {Y[i]-D, Y[i]+D}){
            ans += lower_bound(vyx.begin(), vyx.end(), make_pair(y, X[i]+D)) - upper_bound(vyx.begin(), vyx.end(), make_pair(y, X[i]-D));
        }
    }
    cout << ans/2 << endl;
    return 0;
}