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

//MACROS
#define pb push_back
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
typedef long long LL;
typedef pair <int,int> PII;

struct pt { int x, y, id; };

int par[1<<20];

int Find(int v) { return par[v] = (par[v] == v ? v : Find(par[v])); }
void uni(int v, int u) { par[Find(v)] = Find(u); }

pt a[1<<20];
int n, p, q, e[1<<20];
LL ans;
vector <PII> finv;

int main() {
//Initialization
    auto cmp1 = [&] (const pt &v, const pt &u) { return v.x < u.x || (v.x == u.x && v.y < u.y); };
    auto cmp2 = [&] (const pt &v, const pt &u) { return v.y < u.y || (v.y == u.y && v.x < u.x); };

	cin >> n >> p >> q;
	p--, q--;
	rep(i,0,n) {
        int x, y;
        cin >> x >> y;
        a[i] = {x-y,x+y,i};
	}
    int D = max(abs(a[p].x-a[q].x),abs(a[p].y-a[q].y));
    rep(i,0,n) par[i] = i;
//Get points on Ox
    sort(a,a+n,cmp1);
    rep(i,0,n) {
        int lo = lower_bound(a,a+n,(pt){a[i].x + D, a[i].y - D, -1}, cmp1) - a;
        int hi = upper_bound(a,a+n,(pt){a[i].x + D, a[i].y + D, -1}, cmp1) - a;
        if (lo != hi) {
            uni(a[i].id,a[lo].id);
            e[lo+1]++, e[hi]--;
        }

        lo = lower_bound(a,a+n,(pt){a[i].x - D, a[i].y - D, -1}, cmp1) - a;
        hi = upper_bound(a,a+n,(pt){a[i].x - D, a[i].y + D, -1}, cmp1) - a;
        if (lo != hi) {
            uni(a[i].id,a[lo].id);
            e[lo+1]++, e[hi]--;
        }
    }
    rep(i,1,n) {
        e[i] += e[i-1];
        if (e[i]) uni(a[i-1].id,a[i].id);
    }
    rep(i,0,n) e[i] = 0;
//Get points on Oy
    sort(a,a+n,cmp2);
    rep(i,0,n) {
        int lo = lower_bound(a,a+n,(pt){a[i].x - D, a[i].y - D, -1}, cmp2) - a;
        int hi = upper_bound(a,a+n,(pt){a[i].x + D, a[i].y - D, -1}, cmp2) - a;
        if (lo != hi) {
            uni(a[i].id,a[lo].id);
            e[lo+1]++, e[hi]--;
        }

        lo = lower_bound(a,a+n,(pt){a[i].x - D, a[i].y + D, -1}, cmp2) - a;
        hi = upper_bound(a,a+n,(pt){a[i].x + D, a[i].y + D, -1}, cmp2) - a;
        if (lo != hi) {
            uni(a[i].id,a[lo].id);
            e[lo+1]++, e[hi]--;
        }
    }
    rep(i,1,n) {
        e[i] += e[i-1];
        if (e[i]) uni(a[i-1].id,a[i].id);
    }
//Create graph and get answer
    rep(i,0,n) if (Find(a[i].id) == Find(q)) finv.pb({a[i].x,a[i].y});
    sort(finv.begin(),finv.end());
    rep(i,0,finv.size()) {
        ans += lower_bound(finv.begin(),finv.end(),PII(finv[i].first + D, finv[i].second + D)) -
                lower_bound(finv.begin(),finv.end(),PII(finv[i].first + D, finv[i].second - D));
        ans += lower_bound(finv.begin(),finv.end(),PII(finv[i].first - D, finv[i].second + D)) -
                lower_bound(finv.begin(),finv.end(),PII(finv[i].first - D, finv[i].second - D));
    }
    rep(i,0,finv.size()) swap(finv[i].first,finv[i].second);
    sort(finv.begin(),finv.end());
    rep(i,0,finv.size()) {
        ans += lower_bound(finv.begin(),finv.end(),PII(finv[i].first + D, finv[i].second + D)) -
                lower_bound(finv.begin(),finv.end(),PII(finv[i].first + D, finv[i].second - D));
        ans += lower_bound(finv.begin(),finv.end(),PII(finv[i].first - D, finv[i].second + D)) -
                lower_bound(finv.begin(),finv.end(),PII(finv[i].first - D, finv[i].second - D));
    }
    cout << ans/2;
}


Measured memory_bytes: 6008