#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
const int maxN = 1e5 + 10;
ll x[maxN], y[maxN];
int n, a, b;
void un(vector < ll >& a) {
    sort(a.begin(), a.end());
    a.erase(unique(a.begin(), a.end()), a.end());
}
set < pair < ll, int > > byX[maxN];
set < pair < ll, int > > byY[maxN];
bool good[maxN];
int hisX[maxN], hisY[maxN];
int getId(vector < ll >& a, ll x) {
    return lower_bound(a.begin(), a.end(), x) - a.begin();
}
void add(int v) {
    byX[hisX[v]].insert(make_pair(y[v], v));
    byY[hisY[v]].insert(make_pair(x[v], v));
}
void del(int v) {
    byX[hisX[v]].erase(make_pair(y[v], v));
    byY[hisY[v]].erase(make_pair(x[v], v));
}
vector < ll > fX[maxN];
vector < ll > fY[maxN];
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
//    freopen("input.txt", "r", stdin);
    cin >> n >> a >> b;
    vector < ll > idX, idY;
    for (int i = 1; i <= n; i++) {
        cin >> x[i] >> y[i];
        ll u = x[i] + y[i];
        ll v = x[i] - y[i];
        x[i] = u;
        y[i] = v;
        idX.emplace_back(x[i]);
        idY.emplace_back(y[i]);
    }
    un(idX);
    un(idY);
    ll d = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
    for (int i = 1; i <= n; i++) {
        hisX[i] = getId(idX, x[i]);
        hisY[i] = getId(idY, y[i]);
    }
    for (int i = 1; i <= n; i++) {
        add(i);
    }
    del(a);
    del(b);
    good[a] = good[b] = true;
    queue < int > q;
    q.push(a);
    q.push(b);
    while (!q.empty()) {
        int v = q.front();
        q.pop();
        for (int sgn = -1; sgn <= 1; sgn += 2) {
            ll hisX = x[v] + sgn * d;
            auto it = lower_bound(idX.begin(), idX.end(), hisX) - idX.begin();
            if (it != idX.size() && idX[it] == hisX) {
                while (true) {
                    auto pit = byX[it].lower_bound({y[v] - d, -1});
                    if (pit != byX[it].end() && (pit->first <= y[v] + d)) {
                        assert(!good[pit->second]);
                        good[pit->second] = true;
                        q.push(pit->second);
                        auto ttt = pit->second;
                        del(ttt);
                    }
                    else {
                        break;
                    }
                }
            }
        }
        for (int sgn = -1; sgn <= 1; sgn += 2) {
            ll hisY = y[v] + sgn * d;
            auto it = lower_bound(idY.begin(), idY.end(), hisY) - idY.begin();
            if (it != idY.size() && idY[it] == hisY) {
                while (true) {
                    auto pit = byY[it].lower_bound({x[v] - d, -1});
                    if (pit != byY[it].end() && (pit->first <= x[v] + d)) {
                        assert(!good[pit->second]);
                        good[pit->second] = true;
                        q.push(pit->second);
                        auto ttt = pit->second;
                        del(ttt);
                    }
                    else {
                        break;
                    }
                }
            }
        }
    }



    map < pair < ll, ll >, int > mp;
    for (int i = 1; i <= n; i++) {
        if (good[i]) {
            fX[hisX[i]].emplace_back(y[i]);
            fY[hisY[i]].emplace_back(x[i]);
            mp[{x[i], y[i]}]++;
        }
    }



    for (int i = 0; i < n; i++) {
        sort(fX[i].begin(), fX[i].end());
        sort(fY[i].begin(), fY[i].end());
    }
    ll ans = 0;
    for (int i = 1; i <= n; i++) {
        if (good[i]) {
            for (int sgn = -1; sgn <= 1; sgn += 2) {
                ll hisX = x[i] + sgn * d;
                auto it = lower_bound(idX.begin(), idX.end(), hisX) - idX.begin();
                if (it != idX.size() && idX[it] == hisX) {
                    auto pit1 = lower_bound(fX[it].begin(), fX[it].end(), y[i] - d) - fX[it].begin();
                    auto pit2 = upper_bound(fX[it].begin(), fX[it].end(), y[i] + d) - fX[it].begin();
                    ans += (pit2 - pit1);
                }
            }
            for (int sgn = -1; sgn <= 1; sgn += 2) {
                ll hisY = y[i] + sgn * d;
                auto it = lower_bound(idY.begin(), idY.end(), hisY) - idY.begin();
                if (it != idY.size() && idY[it] == hisY) {
                    auto pit1 = lower_bound(fY[it].begin(), fY[it].end(), x[i] - d) - fY[it].begin();
                    auto pit2 = upper_bound(fY[it].begin(), fY[it].end(), x[i] + d) - fY[it].begin();
                    ans += (pit2 - pit1);
                }
            }
            for (int a = -1; a <= 1; a += 2) {
                for (int b = -1; b <= 1; b += 2) {
                    ans -= mp.count({x[i] + a * d, y[i] + b * d});
                }
            }
        }
    }
    cout << ans / 2;
    return 0;
}

Measured memory_bytes: 31852