#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
set<l_l> field[2];
vector<l_l> no_field[2];
ll N, a, b;
vector<l_l> searching;
int main() {
    //cout.precision(10);
    cin >> N >> a >> b;
    for(int i = 1; i <= N; i++) {
        ll x, y;
        cin >> x >> y;
        x += 1e9;
        ll X = x + y;
        ll Y = x - y;
        field[0].insert({X, Y});
        no_field[0].push_back({X, Y});
        field[1].insert({Y, X});
        no_field[1].push_back({Y, X});
        if(i == a || i == b) {
            searching.push_back({X, Y});
            field[0].erase({X, Y});
            field[1].erase({Y, X});
        }
    }
    for(int i = 0; i <= 1; i++) {
        field[i].insert({1e12, 1e12});
        no_field[i].push_back({1e12, 1e12});
    }
    ll delta = max(abs(searching[0].first - searching[1].first), abs(searching[0].second - searching[1].second));
    //cout << delta << endl;
    for(int index = 0; index < searching.size(); index++) {
        ll X = searching[index].first;
        ll Y = searching[index].second;
        auto itr = field[0].lower_bound({X - delta, Y - delta});
        while((*itr).second <= Y + delta && (*itr).first == X - delta) {
            ll nowX = (*itr).first;
            ll nowY = (*itr).second;
            itr++;
            searching.push_back({nowX, nowY});
            field[0].erase({nowX, nowY});
            field[1].erase({nowY, nowX});
        }
        itr = field[0].lower_bound({X + delta, Y - delta});
        while((*itr).second <= Y + delta && (*itr).first == X + delta) {
            ll nowX = (*itr).first;
            ll nowY = (*itr).second;
            itr++;
            searching.push_back({nowX, nowY});
            field[0].erase({nowX, nowY});
            field[1].erase({nowY, nowX});
        }
        itr = field[1].lower_bound({Y - delta, X - delta});
        while((*itr).second <= X + delta && (*itr).first == Y - delta) {
            ll nowY = (*itr).first;
            ll nowX = (*itr).second;
            itr++;
            searching.push_back({nowX, nowY});
            field[0].erase({nowX, nowY});
            field[1].erase({nowY, nowX});
        }
        itr = field[1].lower_bound({Y + delta, X - delta});
        while((*itr).second <= X + delta && (*itr).first == Y + delta) {
            ll nowY = (*itr).first;
            ll nowX = (*itr).second;
            itr++;
            searching.push_back({nowX, nowY});
            field[0].erase({nowX, nowY});
            field[1].erase({nowY, nowX});
        }
    }
    for(int i = 0; i <= 1; i++) {
        sort(no_field[i].begin(), no_field[i].end());
    }
    /*
    for(int i = 0; i < searching.size(); i++) {
        cout << searching[i].first << " " << searching[i].second << endl;
    }
    */
    ll ans = 0;
    for(int index = 0; index < searching.size(); index++) {
        ll X = searching[index].first;
        ll Y = searching[index].second;
        //cout << index << " " << X << " " << Y << endl;
        auto itr = lower_bound(no_field[0].begin(), no_field[0].end(), make_pair(X-delta, Y-delta));
        auto itr2 = lower_bound(no_field[0].begin(), no_field[0].end(), make_pair(X-delta, Y+delta+1));
        //cout << distance(itr, itr2) << " ";
        ans += distance(itr, itr2);
        itr = lower_bound(no_field[0].begin(), no_field[0].end(), make_pair(X+delta, Y-delta));
        itr2 = lower_bound(no_field[0].begin(), no_field[0].end(), make_pair(X+delta, Y+delta+1));
        ans += distance(itr, itr2);
        //cout << distance(itr, itr2) << " ";
        itr = lower_bound(no_field[1].begin(), no_field[1].end(), make_pair(Y-delta, X-delta+1));
        itr2 = lower_bound(no_field[1].begin(), no_field[1].end(), make_pair(Y-delta, X+delta+1-1));
        ans += distance(itr, itr2);
        //cout << distance(itr, itr2) << " ";
        itr = lower_bound(no_field[1].begin(), no_field[1].end(), make_pair(Y+delta, X-delta+1));
        itr2 = lower_bound(no_field[1].begin(), no_field[1].end(), make_pair(Y+delta, X+delta+1-1));
        ans += distance(itr, itr2);
        //cout << distance(itr, itr2) << " ";
        //cout << endl;
    }
    cout << ans / 2 << endl;
    return 0;
}


Measured memory_bytes: 18912