#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
typedef pair<int, int> PII;

int n;
int x[100005], y[100005];
int e[100005];
int a, b;
map<LL, vector<int> > pl, mi;

struct Cmp {
    inline bool operator()(const int &lhs, const int &rhs) const {
        if (x[lhs] != x[rhs]) {
            return x[lhs] < x[rhs];
        }
        return lhs > rhs;
    }
};

map<LL, set<int, Cmp> > pls, mis;

inline bool cmp(const int &lhs, const int &rhs) {
    return x[lhs] < x[rhs];
}

int dist(int i, int j) {
    return abs(x[i] - x[j]) + abs(y[i] - y[j]);
}

bool vis[100005];
queue<int> q;

const LL INF = 2e9 + 123;

int main() {
    //freopen("input.txt", "r", stdin);
    scanf("%d", &n);
    scanf("%d%d", &a, &b);
    --a, --b;
    forn(i, n) {
        scanf("%d%d", x + i, y + i);
    }
    forn(i, n) {
        pl[x[i] + y[i]].pb(i);
        mi[x[i] - y[i]].pb(i);
        pls[x[i] + y[i]].insert(i);
        mis[x[i] - y[i]].insert(i);
    }
    for (auto &p : pl) {
        vector<int> &v = p.second;
        sort(v.begin(), v.end(), cmp);
    }
    for (auto &p : mi) {
        vector<int> &v = p.second;
        sort(v.begin(), v.end(), cmp);
    }
    int dd = dist(a, b);
    LL ans = 0;
    forn(i, n) {
//        cerr << i << ":";
        {
            LL xy = x[i] + y[i];
            xy += dd;
            vector<int> &v = pl[xy];
            x[n] = x[i];
            auto beg = lower_bound(v.begin(), v.end(), n, cmp);
            x[n] = min(INF, (LL)x[i] + dd + 1);
            auto ed = lower_bound(v.begin(), v.end(), n, cmp);
            e[i] = int(ed - beg);
        }

//        cerr << ' ' << e[i];

        {
            LL xy = x[i] + y[i];
            xy -= dd;
            vector<int> &v = pl[xy];
            x[n] = max(-INF, (LL)x[i] - dd);
            auto beg = lower_bound(v.begin(), v.end(), n, cmp);
            x[n] = x[i] + 1;
            auto ed = lower_bound(v.begin(), v.end(), n, cmp);
            e[i] += int(ed - beg);
        }

//        cerr << ' ' << e[i];

        {
            LL xy = x[i] - y[i];
            xy += dd;
            vector<int> &v = mi[xy];
            x[n] = x[i] + 1;
            auto beg = lower_bound(v.begin(), v.end(), n, cmp);
            x[n] = min(INF, (LL)x[i] + dd);
            auto ed = lower_bound(v.begin(), v.end(), n, cmp);
            e[i] += max(0, int(ed - beg));
        }
//
//        cerr << ' ' << e[i];

        {
            LL xy = x[i] - y[i];
            xy -= dd;
            vector<int> &v = mi[xy];
            x[n] = max(-INF, (LL)x[i] - dd + 1);
            auto beg = lower_bound(v.begin(), v.end(), n, cmp);
            x[n] = x[i];
            auto ed = lower_bound(v.begin(), v.end(), n, cmp);
            e[i] += max(0, int(ed - beg));
        }
//
//        cerr << ' ' << e[i];
//        cerr << endl;
    }
//    cerr << dd << endl;
//    forn(i, n) cerr << e[i] << ' ';
//    cerr << endl;

    vis[a] = true;
    vis[b] = true;
    q.push(a);
    q.push(b);
    while (!q.empty()) {
        int i = q.front();
        q.pop();

        {
            LL xy = x[i] + y[i];
            xy += dd;
            set<int, Cmp> &v = pls[xy];
            x[n] = x[i];
            auto beg = v.lower_bound(n);
            x[n] = min(INF, (LL)x[i] + dd + 1);
            auto ed = v.lower_bound(n);
            for (auto it = beg; it != ed; ++it) {
                int to = *it;
                if (!vis[to]) {
                    vis[to] = true;
                    q.push(to);
                }
            }
            v.erase(beg, ed);
        }

        {
            LL xy = x[i] + y[i];
            xy -= dd;
            set<int, Cmp> &v = pls[xy];
            x[n] = max(-INF, (LL)x[i] - dd);
            auto beg = v.lower_bound(n);
            x[n] = x[i] + 1;
            auto ed = v.lower_bound(n);
            for (auto it = beg; it != ed; ++it) {
                int to = *it;
                if (!vis[to]) {
                    vis[to] = true;
                    q.push(to);
                }
            }
            v.erase(beg, ed);
        }

        {
            LL xy = x[i] - y[i];
            xy += dd;
            set<int, Cmp> &v = mis[xy];
            x[n] = x[i];
            auto beg = v.lower_bound(n);
            x[n] = min(INF, (LL)x[i] + dd + 1);
            auto ed = v.lower_bound(n);
            for (auto it = beg; it != ed; ++it) {
                int to = *it;
                if (!vis[to]) {
                    vis[to] = true;
                    q.push(to);
                }
            }
            v.erase(beg, ed);
        }

        {
            LL xy = x[i] - y[i];
            xy -= dd;
            set<int, Cmp> &v = mis[xy];
            x[n] = max(-INF, (LL)x[i] - dd);
            auto beg = v.lower_bound(n);
            x[n] = x[i] + 1;
            auto ed = v.lower_bound(n);
            for (auto it = beg; it != ed; ++it) {
                int to = *it;
                if (!vis[to]) {
                    vis[to] = true;
                    q.push(to);
                }
            }
            v.erase(beg, ed);
        }
    }
//    forn(i, n) {
//        cerr << vis[i] << ' ';
//    }
//    cerr << endl;
    forn(i, n) if (vis[i]) {
        ans += e[i];
    }
    ans /= 2;
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 79872