#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

#include <queue>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;

typedef pair<LL,LL> PLL;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

#define MOD 1000000007
#define INF 2000000000

int GLL(LL& x) {
    return scanf("%lld", &x);
}

int GI(int& x) {
    return scanf("%d", &x);
}

const int MAXN = 100005;
int visited[MAXN], neigh[MAXN]; LL x[MAXN], y[MAXN];

map<LL, set<PLL> > pos, neg;
map<LL, vector<LL> > posOrd, negOrd;

queue<LL> q;

int n, a, b; LL d;

int main() {
    GI(n); GI(a); GI(b);

    FOR1(i, n) {
        GLL(x[i]);
        GLL(y[i]);

        pos[y[i] - x[i]].insert(MP(x[i], i));
        neg[y[i] + x[i]].insert(MP(x[i], i));

        posOrd[y[i] - x[i]].PB(x[i]);
        negOrd[y[i] + x[i]].PB(x[i]);
    }

    for (auto& v : posOrd) sort(v.SS.begin(), v.SS.end());
    for (auto& v : negOrd) sort(v.SS.begin(), v.SS.end());

    d = abs(x[a] - x[b]) + abs(y[a] - y[b]);

    memset(visited, 0, sizeof visited); q.push(a);

    memset(neigh, 0, sizeof neigh);

    while (q.size() > 0) {
        LL u = q.front(); q.pop(); if (visited[u]) continue;
        visited[u] = 1;

        // LR
        if (pos.find(y[u] - x[u] - d) != pos.end()) {
            set<PLL>& s = pos[y[u] - x[u] - d];

            auto i = s.upper_bound(MP(x[u], -1LL));
            auto j = i;

            while (j != s.end() && j->FF <= x[u] + d) {
                if (!visited[j->SS]) q.push(j->SS);
                j++;
            }

            if (i != j) s.erase(i, j);

            vector<LL>& v = posOrd[y[u] - x[u] - d];
            neigh[u] += lower_bound(v.begin(), v.end(), x[u] + d) - lower_bound(v.begin(), v.end(), x[u]);
        }

        // UL
        if (pos.find(y[u] - x[u] + d) != pos.end()) {
            set<PLL>& s = pos[y[u] - x[u] + d];

            auto i = s.upper_bound(MP(x[u] - d, -1LL));
            auto j = i;

            while (j != s.end() && j->FF <= x[u]) {
                if (!visited[j->SS]) q.push(j->SS);
                j++;
            }

            if (i != j) s.erase(i, j);
            
            vector<LL>& v = posOrd[y[u] - x[u] + d];
            neigh[u] += lower_bound(v.begin(), v.end(), x[u] + 1) - lower_bound(v.begin(), v.end(), x[u] - d + 1);
        }

        // LL
        if (neg.find(y[u] + x[u] - d) != neg.end()) {
            set<PLL>& s = neg[y[u] + x[u] - d];

            auto i = s.upper_bound(MP(x[u] - d, -1LL));
            auto j = i;

            while (j != s.end() && j->FF <= x[u]) {
                if (!visited[j->SS]) q.push(j->SS);
                j++;
            }

            if (i != j) s.erase(i, j);
            
            vector<LL>& v = negOrd[y[u] + x[u] - d];
            neigh[u] += lower_bound(v.begin(), v.end(), x[u]) - lower_bound(v.begin(), v.end(), x[u] - d);
        }

        // UR
        if (neg.find(y[u] + x[u] + d) != neg.end()) {
            set<PLL>& s = neg[y[u] + x[u] + d];

            auto i = s.upper_bound(MP(x[u], -1LL));
            auto j = i;

            while (j != s.end() && j->FF <= x[u] + d) {
                if (!visited[j->SS]) q.push(j->SS);
                j++;
            }

            if (i != j) s.erase(i, j);
            
            vector<LL>& v = negOrd[y[u] + x[u] + d];
            neigh[u] += lower_bound(v.begin(), v.end(), x[u] + d + 1) - lower_bound(v.begin(), v.end(), x[u] + 1);
        }
    }

    LL res = 0;
    FOR1(i, n) res += neigh[i];

    printf("%lld\n", res / 2);
    return 0;
}


Measured memory_bytes: 50304