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

typedef long long i64;

const int NMAX = 1e5 + 5;
const i64 LIM = 4e9;

struct PTX {
    i64 x, y; };

struct STree {
    struct Nod {
        Nod *st, *dr;
        int sum;

        inline Nod() {
            st = dr = nullptr;
            sum = 0; } };

    i64 pos, x, y;
    int sum;
    Nod *root;

    void update(Nod *&nod, i64 st, i64 dr) {
        if (nod == nullptr) nod = new Nod();
        if (st == dr) {
            ++nod->sum;
            return; }

        i64 med = (st + dr) / 2;

        (pos <= med) ? update(nod->st, st, med) : update(nod->dr, med + 1, dr);

        nod->sum = 0;
        if (nod->st != nullptr) nod->sum+= nod->st->sum;
        if (nod->dr != nullptr) nod->sum+= nod->dr->sum; }

    void update(i64 _pos) {
        pos = _pos + LIM;
        update(root, 1, 2 * LIM);
        return; }

    void query(Nod *nod, i64 st, i64 dr) {
        if (nod == nullptr) return;
        if (x <= st && dr <= y) {
            sum+= nod->sum;
            return; }
        i64 med = (st + dr) / 2;

        if (x <= med) query(nod->st, st, med);
        if (med < y) query(nod->dr, med + 1, dr); }

    int query(i64 _x, i64 _y) {
        sum = 0;
        x = _x + LIM;
        y = _y + LIM;

        query(root, 1, 2 * LIM);

        return sum; } };

vector<PTX> pts;
int n, a, b;
i64 ant, d;

map<i64, STree> arb_hor, arb_ver;
map<i64, set<pair<i64, int>>> nod_hor, nod_ver;
vector<int> nods;
bitset<NMAX> tkn;

i64 dist(PTX a, PTX b) {
    return max(abs(a.x - b.x), abs(a.y - b.y)); }

void get_from(set<pair<i64, int>> &s, i64 x, i64 y) {
    set<pair<i64, int>>::iterator it, aux;

    for (it = s.lower_bound({x, 0}); it != s.end() && it->first <= y; it = aux) {
        if (!tkn[it->second]) {
            tkn[it->second] = 1;
            nods.push_back(it->second); }

        aux = it;
        aux++;
        s.erase(it); } }

void append(PTX pt) {
    get_from(nod_hor[pt.y + d], pt.x - d, pt.x + d);
    get_from(nod_hor[pt.y - d], pt.x - d, pt.x + d);

    get_from(nod_ver[pt.x + d], pt.y - d, pt.y + d);
    get_from(nod_ver[pt.x - d], pt.y - d, pt.y + d); }

void add(PTX pt) {
    ant+= arb_hor[pt.y + d].query(pt.x - d, pt.x + d); ant-= arb_hor[pt.y + d].query(pt.x - d, pt.x - d);
    ant+= arb_hor[pt.y - d].query(pt.x - d, pt.x + d); ant-= arb_hor[pt.y + d].query(pt.x + d, pt.x + d);
    ant+= arb_ver[pt.x + d].query(pt.y - d, pt.y + d); ant-= arb_hor[pt.y - d].query(pt.x - d, pt.x - d);
    ant+= arb_ver[pt.x - d].query(pt.y - d, pt.y + d); ant-= arb_hor[pt.y - d].query(pt.x + d, pt.x + d); }

int main() {
    //freopen("dat.in", "r", stdin);
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    i64 x, y;

    cin >> n >> a >> b; --a, --b;
    pts.resize(n);
    for (auto &i: pts) {
        cin >> i.x >> i.y;
        x = i.x + i.y;
        y = i.y - i.x;
        i = {x, y}; }

    d = dist(pts[a], pts[b]);
    for (int i = 0; i < n; ++i)
        if (i != a && i != b) {
            nod_hor[pts[i].y].insert({pts[i].x, i});
            nod_ver[pts[i].x].insert({pts[i].y, i}); }

    nods.push_back(a), tkn[a] = 1;
    nods.push_back(b), tkn[b] = 1;

    for (int i = 0; i < nods.size(); ++i)
        append(pts[nods[i]]);

    nod_ver.clear();
    nod_hor.clear();

    for (int i = 0; i < n; ++i) if (tkn[i]) {
        arb_hor[pts[i].y].update(pts[i].x);
        arb_ver[pts[i].x].update(pts[i].y); }

    for (int i = 0; i < nods.size(); ++i)
        add(pts[nods[i]]);

    cout << ant / 2 << '\n';

    return 0; }


Measured memory_bytes: 241404