#include <bits/stdc++.h>
#define forn(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
using namespace std;

const int MAXN = 100000, INF = 1e9;

struct point {
    int x, y, index;
    point(int x, int y, int index) : x(x), y(y), index(index) {}
};

bool operator<(const point& first, const point& second) {
    if(first.x != second.x)
        return first.x < second.x;
    else if(first.y != second.y)
        return first.y < second.y;
    else
        return first.index < second.index;
}

int x[MAXN + 1], y[MAXN + 1], can[MAXN + 1], ans[MAXN + 1];
map<int, set<point> > r1, r2;
map<int, vector<point> > v1, v2;
map<pair<int, int>, int> wasPoint;

int main() {
    //ios_base::sync_with_stdio(false);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n, a, b;
    scanf("%d%d%d", &n, &a, &b);
    a--, b--;
    for(int i = 0; i < n; i++) {
        scanf("%d%d", &x[i], &y[i]);
        r1[x[i] + y[i]].insert({ x[i], y[i], i });
        r2[x[i] - y[i]].insert({ x[i], y[i], i });

        v1[x[i] + y[i]].push_back({ x[i], y[i], i });
        v2[x[i] - y[i]].push_back({ x[i], y[i], i });

        wasPoint[{ x[i], y[i] }] = 1;
    }
    for(auto &it: v1) {
        sort(it.second.begin(), it.second.end());
    }
    for(auto &it: v2) {
        sort(it.second.begin(), it.second.end());
    }
    int canD = abs(x[a] - x[b]) + abs(y[a] - y[b]);
    queue<int> q;
    q.push(a);
    q.push(b);
    can[a] = can[b] = 1;
    while(!q.empty()) {
        int v = q.front();
        q.pop();
        int cur = x[v] + y[v] - canD;
        int &temp = ans[v];
        ans[v] += lower_bound(v1[cur].begin(), v1[cur].end(), point(x[v] + 1, -INF, -INF)) - lower_bound(v1[cur].begin(), v1[cur].end(), point(x[v] - canD, -INF, -INF));
        while(true) {
            auto it = r1[cur].lower_bound({ x[v] - canD, -INF, -INF });
            if(it == r1[cur].end() || it->x > x[v])
                break;
            if(!can[it->index]) {
                can[it->index] = 1;
                q.push(it->index);
            }
            r1[cur].erase(it);
        }
        cur = x[v] + y[v] + canD;
        ans[v] += lower_bound(v1[cur].begin(), v1[cur].end(), point(x[v] + canD + 1, -INF, -INF)) - lower_bound(v1[cur].begin(), v1[cur].end(), point(x[v], -INF, -INF));
        while(true) {
            auto it = r1[cur].lower_bound({ x[v], -INF, -INF });
            if(it == r1[cur].end() || it->x > x[v] + canD)
                break;
            if(!can[it->index]) {
                can[it->index] = 1;
                q.push(it->index);
            }
            r1[cur].erase(it);
        }

        cur = x[v] - y[v] + canD;
        ans[v] += lower_bound(v2[cur].begin(), v2[cur].end(), point(x[v] + canD + 1, -INF, -INF)) - lower_bound(v2[cur].begin(), v2[cur].end(), point(x[v], -INF, -INF));
        while(true) {
            auto it = r2[cur].lower_bound({ x[v], -INF, -INF });
            if(it == r2[cur].end() || it->x > x[v] + canD)
                break;
            if(!can[it->index]) {
                can[it->index] = 1;
                q.push(it->index);
            }
            r2[cur].erase(it);
        }
        cur = x[v] - y[v] - canD;
        ans[v] += lower_bound(v2[cur].begin(), v2[cur].end(), point(x[v] + 1, -INF, -INF)) - lower_bound(v2[cur].begin(), v2[cur].end(), point(x[v] - canD, -INF, -INF));
        while(true) {
            auto it = r2[cur].lower_bound({ x[v] - canD, -INF, -INF });
            if(it == r2[cur].end() || it->x > x[v])
                break;
            if(!can[it->index]) {
                can[it->index] = 1;
                q.push(it->index);
            }
            r2[cur].erase(it);
        }

        if(wasPoint[{ x[v], y[v] - canD }])
            ans[v]--;
        if(wasPoint[{ x[v], y[v] + canD }])
            ans[v]--;
        if(wasPoint[{ x[v] - canD, y[v] }])
            ans[v]--;
        if(wasPoint[{ x[v] + canD, y[v] }])
            ans[v]--;
    }
    ll res = 0;
    for(int i = 0; i < n; i++) {
        if(can[i]) {
            //cout << i + 1 << " " << ans[i] << endl;
            res += ans[i];
        }
    }
    cout << res / 2 << endl;
    //for(int i = 0; i < n; i++)
    //    if(can[i])
    //        cout << i << endl;
    /*for(auto &it: r1)
        it.second.clear();
    for(auto &it: r2)
        it.second.clear();
    vector<point> v;
    for(int i = 0; i < n; i++) {
        v.push_back({x[i], y[i], i});
        wasPoint[{ x[i], y[i] }] = 1;
    }
    sort(v.begin(), v.end());
    ll ans = 0;
    for(int i = 0; i < (int)v.size(); i++) {
        if(can[v[i].index]) {
            int cur = -(v[i].x + v[i].y - canD);
            ans += (int) r1[cur].size();
            cur = -(v[i].x - v[i].y - canD);
            ans += (int) r2[cur].size();
            if (wasPoint[{v[i].x - canD, v[i].y}])
                ans--;
            cout << v[i].index + 1 << " " << ans << endl;
        }
        r1[-v[i].x - v[i].y].insert(i);
        r2[-v[i].x + v[i].y].insert(i);
    }
    cout << ans << endl;*/
    return 0;
}

Measured memory_bytes: 105856