#include <bits/stdc++.h>
using namespace std;
#define LL long long
int n, a, b;
const int N = 200000;
int xi[N], yi[N], fa[N], dis;
map <int, vector <int> > X, Y;
int compX(int a, int b) {return xi[a] < xi[b];}
int compY(int a, int b) {return yi[a] < yi[b];}
int get_f(int a) {return fa[a] = (fa[a] == a? a: get_f(fa[a]));}
LL ans;
void print(vector <int> a) {for (int i = 0; i < a.size(); ++ i) cerr << a[i] << " "; cerr << endl;}
int main()
{
    cin >> n >> a >> b;
    for (int i = 1; i <= n; ++ i) fa[i] = i;
    for (int i = 1; i <= n; ++ i)
    {
        int x, y;
        cin >> x >> y;
        xi[i] = x + y; yi[i] = x - y;
        X[xi[i]].push_back(i);
        Y[yi[i]].push_back(i);
    }
    dis = max(abs(xi[a] - xi[b]), abs(yi[a] - yi[b]));
    for (auto it = X.begin(); it != X.end(); ++ it)
        sort(it -> second.begin(), it -> second.end(), compY);
    for (auto it = Y.begin(); it != Y.end(); ++ it)
        sort(it -> second.begin(), it -> second.end(), compX);

    for (auto it = X.begin(); it != X.end(); ++ it)
    {
        auto ip = X.lower_bound(it -> first - dis);
        if (ip -> first != it -> first - dis) continue;
        for (int p = 0, q = 0; p < ip -> second.size() && q < it -> second.size(); )
        {
            if (abs(yi[ip -> second[p]] - yi[it -> second[q]]) <= dis) fa[get_f(ip -> second[p])] = get_f(it -> second[q]);
            if (p != ip -> second.size() - 1 && abs(yi[ip -> second[p + 1]] - yi[it -> second[q]]) <= dis) fa[get_f(ip -> second[p + 1])] = get_f(it -> second[q]);
            if (q != it -> second.size() - 1 && abs(yi[ip -> second[p]] - yi[it -> second[q + 1]]) <= dis) fa[get_f(ip -> second[p])] = get_f(it -> second[q + 1]);

            if (q == it -> second.size() - 1 || (p != ip -> second.size() - 1 && yi[ip -> second[p + 1]] < yi[it -> second[q + 1]]))
                p ++; else q ++;
        }
    }

    for (auto it = Y.begin(); it != Y.end(); ++ it)
    {
        auto ip = Y.lower_bound(it -> first - dis);
        if (ip -> first != it -> first - dis) continue;
        for (int p = 0, q = 0; p < ip -> second.size() && q < it -> second.size(); )
        {
            if (abs(xi[ip -> second[p]] - xi[it -> second[q]]) <= dis) fa[get_f(ip -> second[p])] = get_f(it -> second[q]);
            if (p != ip -> second.size() - 1 && abs(xi[ip -> second[p + 1]] - xi[it -> second[q]]) <= dis) fa[get_f(ip -> second[p + 1])] = get_f(it -> second[q]);
            if (q != it -> second.size() - 1 && abs(xi[ip -> second[p]] - xi[it -> second[q + 1]]) <= dis) fa[get_f(ip -> second[p])] = get_f(it -> second[q + 1]);

            if (q == it -> second.size() - 1 || (p != ip -> second.size() - 1 && xi[ip -> second[p + 1]] < xi[it -> second[q + 1]]))
                p ++; else q ++;
        }
    }

    for (auto it = X.begin(); it != X.end(); ++ it)
    {
        auto ip = X.lower_bound(it -> first - dis);
        if (ip -> first != it -> first - dis) continue;
        for (int p1 = -1, p2 = -1, q = 0; q < it -> second.size(); ++ q)
        {
            while (p2 != ip -> second.size() - 1 && yi[it -> second[q]] + dis > yi[ip -> second[p2 + 1]])
                p2 ++;
            while (p1 != ip -> second.size() - 1 && yi[it -> second[q]] - dis >= yi[ip -> second[p1 + 1]])
                p1 ++;
            if (get_f(it -> second[q]) == get_f(a)) ans += p2 - p1;
        }
    }

    for (auto it = Y.begin(); it != Y.end(); ++ it)
    {
        auto ip = Y.lower_bound(it -> first - dis);
        if (ip -> first != it -> first - dis) continue;
        for (int p1 = -1, p2 = -1, q = 0; q < it -> second.size(); ++ q)
        {
            while (p2 != ip -> second.size() - 1 && xi[it -> second[q]] + dis >= xi[ip -> second[p2 + 1]])
                p2 ++;
            while (p1 != ip -> second.size() - 1 && xi[it -> second[q]] - dis > xi[ip -> second[p1 + 1]])
                p1 ++;
            if (get_f(it -> second[q]) == get_f(a)) ans += p2 - p1;
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 20352