#include <stdio.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath>
#include <map>
//#include <unordered_map>
//#include <unordered_set>
//#include <boost/container/static_vector.hpp>
//#include <boost/unordered_set.hpp>
//#include <boost/unordered_map.hpp>
//#include <unistd.h>

//#include <cv.h>
//#include <highgui.h>
#include <stdlib.h>
#include <string>

const int MAX_N = 100050;
int N;
long long x[MAX_N * 5], y[MAX_N * 5], D;
int a, b;

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

struct Comp_Add {
    bool operator()(const int lhs, const int rhs) {
        if (x[lhs] + y[lhs] != x[rhs] + y[rhs]) {
            return x[lhs] + y[lhs] < x[rhs] + y[rhs];
        }
        return x[lhs] - y[lhs] < x[rhs] - y[rhs];
    }
};

struct Comp_Sub {
    bool operator()(const int lhs, const int rhs) {
        if (x[lhs] - y[lhs] != x[rhs] - y[rhs]) {
            return x[lhs] - y[lhs] < x[rhs] - y[rhs];
        }
        return x[lhs] + y[lhs] < x[rhs] + y[rhs];
    }
};

std::map<long long, std::vector<int>> mp_add, mp_sub;
std::map<long long, std::vector<long long>> mp_add_sub, mp_sub_add;
std::set<int, Comp_Add> mp_add_search;
std::set<int, Comp_Sub> mp_sub_search;

bool can_reach[MAX_N] = {};

void dfs (int i) {
    //std::cout << "dfs:" << i << std::endl;
    can_reach[i] = true;
    mp_add_search.erase(i);
    mp_sub_search.erase(i);

    while (true) {
        auto itr = mp_add_search.lower_bound(N + 4*i - 2);
        if (itr == mp_add_search.upper_bound(N + 4*i - 3)) { break; }
        dfs(*itr);
    }

    while (true) {
        auto itr = mp_add_search.lower_bound(N + 4*i - 1);
        if (itr == mp_add_search.upper_bound(N + 4*i)) { break; }
        dfs(*itr);
    }

    while (true) {
        auto itr = mp_sub_search.lower_bound(N + 4*i);
        if (itr == mp_sub_search.upper_bound(N + 4*i - 3)) { break; }
        dfs(*itr);
    }

    while (true) {
        auto itr = mp_sub_search.lower_bound(N + 4*i - 1);
        if (itr == mp_sub_search.upper_bound(N + 4*i - 2)) { break; }
        dfs(*itr);
    }
}

int main(int argc, char **argv) {
    std::cin >> N >> a >> b;
    for (int i = 1; i <= N; i++) {
        std::cin >> x[i] >> y[i];
    }
    D = abs(x[a] - x[b]) + abs(y[a] - y[b]);
    //std::cout << "checkD:" << D << std::endl;

    for (int i = 1; i <= N; i++) {
        mp_add[x[i] + y[i]].push_back(i);
        mp_sub[x[i] - y[i]].push_back(i);

        mp_add_search.insert(i);
        mp_sub_search.insert(i);

        // 検索開始点
        x[N + 4*i - 3] = x[i] + D; y[N + 4*i - 3] = y[i];
        x[N + 4*i - 2] = x[i]    ; y[N + 4*i - 2] = y[i] + D;
        x[N + 4*i - 1] = x[i] - D; y[N + 4*i - 1] = y[i];
        x[N + 4*i    ] = x[i]    ; y[N + 4*i    ] = y[i] - D;
    }

    for (auto itr = mp_add.begin(); itr != mp_add.end(); ++itr) {
        std::sort(itr->second.begin(), itr->second.end(),
            [](const int v1, const int v2) { return x[v1] - y[v1] < x[v2] - y[v2]; }
        );
        for (int i : itr->second) {
            mp_add_sub[itr->first].push_back(x[i] - y[i]);
        }
    }

    for (auto itr = mp_sub.begin(); itr != mp_sub.end(); ++itr) {
        std::sort(itr->second.begin(), itr->second.end(),
            [](const int v1, const int v2) { return x[v1] + y[v1] < x[v2] + y[v2]; }
        );
        for (int i : itr->second) {
            mp_sub_add[itr->first].push_back(x[i] + y[i]);
        }
    }

    //std::cout << "check1:" << std::endl;

    dfs(a);

    //std::cout << "check2:" << std::endl;

    long long ret = 0;
    for (int i = 1; i <= N; i++) {
        //if (uf.find(i) == uf.find(a)) {
        if (can_reach[i]) {
            //std::cout << "can_reach:" << i << std::endl;
            if (mp_add.find(x[i] + y[i] + D) != mp_add.end()) {
                int lb = std::lower_bound(mp_add_sub[x[i] + y[i] + D].begin(), mp_add_sub[x[i] + y[i] + D].end(), x[i] - y[i] - D) - mp_add_sub[x[i] + y[i] + D].begin();
                int ub = std::upper_bound(mp_add_sub[x[i] + y[i] + D].begin(), mp_add_sub[x[i] + y[i] + D].end(), x[i] - y[i] + D) - mp_add_sub[x[i] + y[i] + D].begin();

                if (lb != mp_add_sub[x[i] + y[i] + D].size()) {
                    ret += ub - lb;
                }
            }

            if (mp_sub.find(x[i] - y[i] + D) != mp_sub.end()) {
                int lb = std::lower_bound(mp_sub_add[x[i] - y[i] + D].begin(), mp_sub_add[x[i] - y[i] + D].end(), x[i] + y[i] - D) - mp_sub_add[x[i] - y[i] + D].begin();
                int ub = std::upper_bound(mp_sub_add[x[i] - y[i] + D].begin(), mp_sub_add[x[i] - y[i] + D].end(), x[i] + y[i] + D) - mp_sub_add[x[i] - y[i] + D].begin();

                if (lb != ub) {
                    ret += ub - lb;
                    // addの方と重複するものは引いておく。
                    const std::vector<int> tmp = mp_sub[x[i] - y[i] + D];
                    if (x[i] == x[tmp[lb]] || y[i] == y[tmp[lb]]) {
                        ret--;
                    }
                    if (ub - 1 != lb) {
                        if (x[i] == x[tmp[ub - 1]] || y[i] == y[tmp[ub - 1]]) {
                            ret--;
                        }
                    }
                }
            }
        }
    }

    std::cout << ret << std::endl;
    
    return 0;
}


Measured memory_bytes: 57984