#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr ll MOD = 1e9 + 7;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, a, b;
    cin >> n >> a >> b;
    --a;
    --b;
    vector<ll> x(n), y(n), vx, vy;
    for (int i = 0; i < n; i++) {
        ll xx, yy;
        cin >> xx >> yy;
        x[i] = xx + yy, y[i] = xx - yy;
        vx.push_back(x[i]);
        vy.push_back(y[i]);
    }
    sort(all(vx));
    sort(all(vy));
    vx.erase(unique(all(vx)), vx.end());
    vy.erase(unique(all(vy)), vy.end());
    int h = vy.size(), w = vx.size();
    vector<set<P>> sx(h), sy(w);
    vector<vector<ll>> tx(h), ty(w);
    for (int i = 0; i < n; i++) {
        int id = lower_bound(all(vx), x[i]) - vx.begin();
        if (i != a) {
            sy[id].insert(P(y[i], i));
        }
        ty[id].push_back(y[i]);
        id = lower_bound(all(vy), y[i]) - vy.begin();
        if (i != a) {
            sx[id].insert(P(x[i], i));
        }
        tx[id].push_back(x[i]);
    }
    for (int i = 0; i < h; i++) {
        sort(all(tx[i]));
    }
    for (int i = 0; i < w; i++) {
        sort(all(ty[i]));
    }
    ll d = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
    vector<int> vis(n);
    vis[a] = 1;
    queue<int> q;
    q.push(a);
    ll res = 0;
    while (!q.empty()) {
        int i = q.front();
        q.pop();
        ll to = x[i] - d;
        int id = lower_bound(all(vx), to) - vx.begin();
        if (vx[id] == to) {
            auto it = sy[id].lower_bound(P(y[i] - d, -1));
            while (it != sy[id].end()) {
                if ((*it).first > y[i] + d) {
                    break;
                }
                if (!vis[(*it).second]) {
                    vis[(*it).second] = 1;
                    q.push((*it).second);
                }
                ++it;
            }
            auto bi = sy[id].lower_bound(P(y[i] - d, -1));
            sy[id].erase(bi, it);
            res += upper_bound(all(ty[id]), y[i] + d) -
                   lower_bound(all(ty[id]), y[i] - d);
        }
        to = x[i] + d;
        id = lower_bound(all(vx), to) - vx.begin();
        if (vx[id] == to) {
            auto it = sy[id].lower_bound(P(y[i] - d, -1));
            while (it != sy[id].end()) {
                if ((*it).first > y[i] + d) {
                    break;
                }
                if (!vis[(*it).second]) {
                    vis[(*it).second] = 1;
                    q.push((*it).second);
                }
                ++it;
            }
            auto bi = sy[id].lower_bound(P(y[i] - d, -1));
            sy[id].erase(bi, it);
            res += upper_bound(all(ty[id]), y[i] + d) -
                   lower_bound(all(ty[id]), y[i] - d);
        }
        to = y[i] - d;
        id = lower_bound(all(vy), to) - vy.begin();
        if (vy[id] == to) {
            auto it = sx[id].lower_bound(P(x[i] - d, -1));
            while (it != sx[id].end()) {
                if ((*it).first > x[i] + d) {
                    break;
                }
                if (!vis[(*it).second]) {
                    vis[(*it).second] = 1;
                    q.push((*it).second);
                }
                ++it;
            }
            auto bi = sx[id].lower_bound(P(x[i] - d, -1));
            sx[id].erase(bi, it);
            res += upper_bound(all(tx[id]), x[i] + d - 1) -
                   lower_bound(all(tx[id]), x[i] - d + 1);
        }
        to = y[i] + d;
        id = lower_bound(all(vy), to) - vy.begin();
        if (vy[id] == to) {
            auto it = sx[id].lower_bound(P(x[i] - d, -1));
            while (it != sx[id].end()) {
                if ((*it).first > x[i] + d) {
                    break;
                }
                if (!vis[(*it).second]) {
                    vis[(*it).second] = 1;
                    q.push((*it).second);
                }
                ++it;
            }
            auto bi = sx[id].lower_bound(P(x[i] - d, -1));
            sx[id].erase(bi, it);
            res += upper_bound(all(tx[id]), x[i] + d - 1) -
                   lower_bound(all(tx[id]), x[i] - d + 1);
        }
    }
    cout << res / 2LL << endl;
}

Measured memory_bytes: 33900