#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;

int N, a, b, d;
set<pair<long long, long long>> s1, s2;
vector<pair<long long, long long>> v1, v2;

void dfs(pair<long long, long long> z) {
    v1.push_back(z);
    s1.erase(z);
    s2.erase(pair<long long, long long>(z.second, z.first));

    while (true) {
        auto itr = s1.lower_bound(pair<long long, long long>(z.first - d, z.second - d));
        auto itr2 = s1.upper_bound(pair<long long, long long>(z.first - d, z.second + d));
        if(itr==itr2) break;
        dfs(*itr);
    }
    while (true) {
        auto itr = s1.lower_bound(pair<long long, long long>(z.first + d, z.second - d));
        auto itr2 = s1.upper_bound(pair<long long, long long>(z.first + d, z.second + d));
        if(itr==itr2) break;
        dfs(*itr);
    }
    while (true) {
        auto itr = s2.lower_bound(pair<long long, long long>(z.second - d, z.first - d));
        auto itr2 = s2.upper_bound(pair<long long, long long>(z.second - d, z.first + d));
        if(itr==itr2) break;
        dfs(pair<long long, long long>(itr->second, itr->first));
    }
    while (true) {
        auto itr = s2.lower_bound(pair<long long, long long>(z.second + d, z.first - d));
        auto itr2 = s2.upper_bound(pair<long long, long long>(z.second + d, z.first + d));
        if(itr==itr2) break;
        dfs(pair<long long, long long>(itr->second, itr->first));
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> a >> b;
    a--, b--;
    pair<long long, long long> za, zb;
    for (int i = 0; i < N; i++) {
        long long x, y;
        cin >> x >> y;
        long long x2 = x + y, y2 = x - y;
        if (i == a) za = pair<long long, long long>(x2, y2);
        if (i == b) zb = pair<long long, long long>(x2, y2);
        s1.insert(pair<long long, long long>(x2, y2));
        s2.insert(pair<long long, long long>(y2, x2));
    }
    d = max(abs(za.first - zb.first), abs(za.second - zb.second));

    dfs(za);

    v2.reserve(v1.size());
    for (auto z : v1) v2.push_back(pair<long long, long long>(z.second, z.first));

    sort(v1.begin(), v1.end());
    sort(v2.begin(), v2.end());
    long long ans = 0;
    for (auto z : v1) {
        ans += lower_bound(v1.begin(), v1.end(),
                           pair<long long, long long>(z.first - d, z.second + d)) -
               upper_bound(v1.begin(), v1.end(),
                           pair<long long, long long>(z.first - d, z.second - d));
        ans += lower_bound(v1.begin(), v1.end(),
                           pair<long long, long long>(z.first + d, z.second + d)) -
               upper_bound(v1.begin(), v1.end(),
                           pair<long long, long long>(z.first + d, z.second - d));

        ans += upper_bound(v2.begin(), v2.end(),
                           pair<long long, long long>(z.second - d, z.first + d)) -
               lower_bound(v2.begin(), v2.end(),
                           pair<long long, long long>(z.second - d, z.first - d));
        ans += upper_bound(v2.begin(), v2.end(),
                           pair<long long, long long>(z.second + d, z.first + d)) -
               lower_bound(v2.begin(), v2.end(),
                           pair<long long, long long>(z.second + d, z.first - d));
    }
    cout << ans / 2 << endl;
    return 0;
}


Measured memory_bytes: 19060