#include <bits/stdc++.h>

#define fi first
#define se second

const int N = 200200;
const long long mod = 1e9 + 7;

using namespace std;

int n;
long long x[N];
long long y[N];
long long p[N];
long long d[N];
map < long long, set < pair < int, long long > > > s;
map < long long, long long > f;

void upd(long long i, int j, long long g)
{
        f[y[i]] += g;
        if(g == 1){
                s[y[i]].insert({j, i});
        } else if(s[y[i]].find({j, i}) != s[y[i]].end()){
                s[y[i]].erase(s[y[i]].find({j, i}));
        }
}

long long get(long long x) { return p[x] == x ? x : p[x] = get(p[x]); }

void un(int x, int y)
{
        x = get(x);
        y = get(y);
        if(x != y){
                p[x] = y;
        }
}

void solve(long long D, long long G)
{
        vector < int > v;
        for(int i = 1; i <= n; i++){
                v.push_back(i);
        }
        sort(v.begin(), v.end(), [&](int i, int j){
                return make_pair(x[i], y[i]) < make_pair(x[j], y[j]);
        });
        f.clear();
        s.clear();
        upd(v[0], 0, 1);
        for(int i = 0, l = 0, r = 0; i < n; i++){
                while(abs(x[v[i]] - x[v[l]]) > D - G){
                        upd(v[l], l, -1);
                        l += 1;
                }
                while(r + 1 < n && abs(x[v[i]] - x[v[r + 1]]) <= D - G){
                        r += 1;
                        upd(v[r], r, 1);
                }

                for(auto g: {y[v[i]] - D, y[v[i]] + D}){
                        if(f.find(g) == f.end() || f[g] == 0){
                                continue;
                        }
                        d[v[i]] += f[g];
                        while(s[g].size() > 1){
                                un(v[i], s[g].begin()->se);
                                s[g].erase(s[g].begin());
                        }
                        un(v[i], s[g].begin()->se);
                }
        }
}

int main()
{
        ios_base::sync_with_stdio(0);

        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);

        long long A, B;
        cin >> n >> A >> B;
        for(int i = 1; i <= n; i++){
                int X, Y;
                cin >> X >> Y;

                x[i] = X - Y;
                y[i] = X + Y;
                p[i] = i;
        }
        long long D = max(abs(x[A] - x[B]), abs(y[A] - y[B]));

        solve(D, 0);
        for(int i = 1; i <= n; i++){
                swap(x[i], y[i]);
        }
        solve(D, 1);

        long long res = 0;
        for(int i = 1; i <= n; i++){
                if(get(i) == get(A)){
                        res += d[i];
                }
        }

        cout << res / 2 << "\n";
}
