#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <tuple>

using lint = long long;

void solve() {
    int n, a, b;
    std::cin >> n >> a >> b;
    --a, --b;

    std::vector<std::pair<lint, lint>> ps(n);
    for (auto& p : ps) {
        lint x, y;
        std::cin >> x >> y;
        p = std::make_pair(x + y, x - y);
    }

    lint d = std::max(std::abs(ps[a].first - ps[b].first),
                      std::abs(ps[a].second - ps[b].second));

    std::vector<int> reach;

    {
        std::map<lint, std::set<std::pair<lint, int>>> xps, yps;
        for (int i = 0; i < n; ++i) {
            lint x, y;
            std::tie(x, y) = ps[i];

            xps[x].emplace(y, i);
            yps[y].emplace(x, i);
        }

        auto erase = [&](int i) {
            lint x, y;
            std::tie(x, y) = ps[i];

            xps[x].erase(std::make_pair(y, i));
            yps[y].erase(std::make_pair(x, i));
        };

        auto xfind = [&](lint x, lint yl, lint yr) -> std::vector<int> {
            std::vector<int> ret;
            if (!xps.count(x)) return ret;

            auto it = xps[x].lower_bound(std::make_pair(yl, -1));
            while (it != xps[x].end() && it->first <= yr) {
                ret.push_back(it->second);
                ++it;
            }
            return ret;
        };

        auto yfind = [&](lint y, lint xl, lint xr) -> std::vector<int> {
            std::vector<int> ret;
            if (!yps.count(y)) return ret;

            auto it = yps[y].lower_bound(std::make_pair(xl, -1));
            while (it != yps[y].end() && it->first <= xr) {
                ret.push_back(it->second);
                ++it;
            }
            return ret;
        };

        std::queue<int> que;
        que.push(a);
        erase(a);
        que.push(b);
        erase(b);

        while (!que.empty()) {
            int i = que.front();
            que.pop();
            reach.push_back(i);

            lint x, y;
            std::tie(x, y) = ps[i];

            for (auto j : xfind(x - d, y - d, y + d)) {
                que.push(j);
                erase(j);
            }
            for (auto j : xfind(x + d, y - d, y + d)) {
                que.push(j);
                erase(j);
            }

            for (auto j : yfind(y - d, x - d, x + d)) {
                que.push(j);
                erase(j);
            }
            for (auto j : yfind(y + d, x - d, x + d)) {
                que.push(j);
                erase(j);
            }
        }
    }

    std::map<lint, std::vector<lint>> xps, yps;
    for (auto i : reach) {
        lint x, y;
        std::tie(x, y) = ps[i];

        xps[x].push_back(y);
        yps[y].push_back(x);
    }

    for (auto& p : xps) {
        std::sort(p.second.begin(), p.second.end());
    }

    for (auto& p : yps) {
        std::sort(p.second.begin(), p.second.end());
    }

    auto xfind = [&](lint x, lint yl, lint yr) -> int {
        if (!xps.count(x)) return 0;

        auto lit = std::lower_bound(xps[x].begin(), xps[x].end(), yl);
        auto rit = std::upper_bound(xps[x].begin(), xps[x].end(), yr);
        return rit - lit;
    };

    auto yfind = [&](lint y, lint xl, lint xr) -> int {
        if (!yps.count(y)) return 0;

        auto lit = std::lower_bound(yps[y].begin(), yps[y].end(), xl);
        auto rit = std::upper_bound(yps[y].begin(), yps[y].end(), xr);
        return rit - lit;
    };

    lint ans = 0;
    for (auto i : reach) {
        lint x, y;
        std::tie(x, y) = ps[i];

        lint cnt = xfind(x - d, y - d, y + d) +
                   xfind(x + d, y - d, y + d) +
                   yfind(y - d, x - d + 1, x + d - 1) +
                   yfind(y + d, x - d + 1, x + d - 1);

        ans += cnt;
    }

    std::cout << ans / 2 << std::endl;
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    solve();

    return 0;
}


Measured memory_bytes: 31228