#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
 
#define $(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second
#define int long long
#define double long double
#define pii pair<int, int>
#define pb push_back
#define vec vector
#define beg begin
#define dbg(x) cout << #x << " = " << x << endl;
 
template<class T> ostream& operator<<(ostream &str, vector<T> &a) {
    for (auto &i : a) {
        str << i << " ";
    }
    return str;
}
 
template<class T> istream& operator>>(istream &str, vector<T> &a) {
    for (auto &i : a) {
        str >> i;
    }
    return str;
}
 
template<class T> ostream& operator<<(ostream &str, pair<T, T> &a) {
    str << a.first << " " << a.second;
    return str;
}
 
template<class T> istream& operator>>(istream &str, pair<T, T> &a) {
    str >> a.first >> a.second;
    return str;
}
 
void solve(); signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    srand(time(0));
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout.setf(ios::fixed); cout.precision(6);
    solve();
    return 0;
}

int n;
int a, b;
vec<pii> pxy, pyx;
map<pii, vec<pii>> g;
map<pii, int> used;
vec<pii> can;

void dfs(pii v) {
    used[v] = 1;
    can.pb(v);
    for (auto u : g[v]) {
        if (!used[u]) {
            dfs(u);
        }
    }
}
 
void solve() {
    cin >> n >> a >> b;
    vec<pii> p(n);
    for (int i = 0; i < n; ++i) {
        int x, y;
        cin >> x >> y;
        p[i] = {x, y};
        int _x = x, _y = y;
        x = (_x - _y);
        y = (_x + _y);
        pxy.pb({x, y});
        pyx.pb({y, x});
    }
    pii start = pxy[a];
    int d = abs(p[a - 1].x - p[b - 1].x) + abs(p[a - 1].y - p[b - 1].y);

    sort(all(pxy));
    sort(all(pyx));

    vec<int> psxy(n), psyx(n);
    for (int i = 0; i < n; ++i) {
        pii tmp1 = {pxy[i].x + d, pxy[i].y - d};
        pii tmp2 = {pxy[i].x + d, pxy[i].y + d};
        int l = lower_bound(all(pxy), tmp1) - pxy.beg();
        int r = upper_bound(all(pxy), tmp2) - pxy.beg() - 1;
        if (l <= r && l != $(pxy)) {
            psxy[l]++;
            psxy[r]--;
            g[pxy[i]].pb(pxy[l]);
            g[pxy[l]].pb(pxy[i]);
        }
    }
    for (int i = 0; i < n; ++i) {
        pii tmp1 = {pyx[i].x + d, pyx[i].y - d};
        pii tmp2 = {pyx[i].x + d, pyx[i].y + d};
        int l = lower_bound(all(pyx), tmp1) - pyx.beg();
        int r = upper_bound(all(pyx), tmp2) - pyx.beg() - 1;
        if (l <= r && l != $(pyx)) {
            psyx[l]++;
            psyx[r]--;
            g[{pyx[i].y, pyx[i].x}].pb({pyx[l].y, pyx[l].x});
            g[{pyx[l].y, pyx[l].x}].pb({pyx[i].y, pyx[i].x});
        }
    }
    for (int i = 1; i < n; ++i) {
        psxy[i] = psxy[i - 1] + psxy[i];
        psyx[i] = psyx[i - 1] + psyx[i];
    }

    int i = 0;
    while (i < n - 1) {
        while (i < n - 1 && psxy[i] == 0) i++;
        int l = i;
        while (i < n - 1 && psxy[i] != 0) i++;
        int r = i - 1;
        if (l != n - 1) {
            for (int i = l; i <= r; ++i) {
                g[pxy[i]].pb(pxy[i + 1]);
                g[pxy[i + 1]].pb(pxy[i]);
            }
        }
    }
    i = 0; 
    while (i < n - 1) {
        while (i < n - 1 && psyx[i] == 0) i++;
        int l = i;
        while (i < n - 1 && psyx[i] != 0) i++;
        int r = i - 1;
        if (l != n - 1) {
            for (int i = l; i <= r; ++i) {
                g[{pyx[i].y, pyx[i].x}].pb({pyx[i + 1].y, pyx[i + 1].x});
                g[{pyx[i + 1].y, pyx[i + 1].x}].pb({pyx[i].y, pyx[i].x});
            }
        }
    }

    dfs(start);

    map<int, vec<int>> X, Y;
    set<pii> se;
    for (auto it : pxy) {
        X[it.x].pb(it.y);
        Y[it.y].pb(it.x);
        se.insert(it);
    }
    for (auto &it : Y) {
        sort(all(it.y));
    }
    for (auto &it : X) {
        sort(all(it.y));
    }

    int ans = 0;
    for (auto pt : can) {
        int x1 = pt.x - d, x2 = pt.x + d;
        int y1 = pt.y - d, y2 = pt.y + d;
        int cur = 0;
        cur += upper_bound(all(X[x1]), y2) - lower_bound(all(X[x1]), y1);
        cur += upper_bound(all(X[x2]), y2) - lower_bound(all(X[x2]), y1);
        cur += upper_bound(all(Y[y1]), x2) - lower_bound(all(Y[y1]), x1);
        cur += upper_bound(all(Y[y2]), x2) - lower_bound(all(Y[y2]), x1);
        if (se.count({x1, y1})) cur--;
        if (se.count({x2, y2})) cur--;
        if (se.count({x1, y2})) cur--;
        if (se.count({x2, y1})) cur--;
        ans += cur;
    }

    assert(ans % 2 == 0);

    cout << max(1ll, ans / 2) << endl;
}

Measured memory_bytes: 77368