#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

const int N = 1e5;
int n, visit[N];
ll d, x[N], y[N];
map<ll, set<PL> > xtoy, ytox;
map<ll, VL> xtoy2, ytox2;

void dfs(int);

ll movex(ll x, ll y){
    if (!xtoy.count(x)) return 0;
    ll ret = 0;
    auto itr = xtoy[x].lower_bound(PL(y - d, 0));
    VI next;
    while (itr != xtoy[x].end()){
        if (itr->first - y <= d){
            ret++;
            int id = itr->second;
            xtoy[x].erase(itr++);
            if (!visit[id]){
                visit[id] = 1;
                next.push_back(id);
            }
        }else{
            break;
        }
    }
    for (int p : next) dfs(p);
    return ret;
}

ll movey(ll y, ll x){
    if (!ytox.count(y)) return 0;
    ll ret = 0;
    auto itr = ytox[y].lower_bound(PL(x - d + 1, 0));
    VI next;
    while (itr != ytox[y].end()){
        if (itr->first - x < d){
            ret++;
            int id = itr->second;
            ytox[y].erase(itr++);
            if (!visit[id]){
                visit[id] = 1;
                // dfs(id);
                next.push_back(id);
            }
        }else{
            break;
        }
    }
    for (int p : next) dfs(p);
    return ret;
}

void dfs(int now){
    // cout << now << endl;
    visit[now] = 1;
    movex(x[now] + d, y[now]);
    movex(x[now] - d, y[now]);
    movey(y[now] + d, x[now]);
    movey(y[now] - d, x[now]);
}

ll countx(ll x, ll y){
    int p1 = lower_bound(ALL(xtoy2[x]), y + d + 1) - xtoy2[x].begin();
    int p2 = lower_bound(ALL(xtoy2[x]), y - d) - xtoy2[x].begin();
    // cout << p1 - p2 << endl;
    return p1 - p2;
}
ll county(ll y, ll x){
    int p1 = lower_bound(ALL(ytox2[y]), x + d) - ytox2[y].begin();
    int p2 = lower_bound(ALL(ytox2[y]), x - d + 1) - ytox2[y].begin();
    // cout << p1 - p2 << endl;
    return p1 - p2;
}

int main() {
    cin >> n;
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    REP(i,n){
        ll p, q;
        scanf("%lld %lld", &p, &q);
        x[i] = p + q;
        y[i] = p - q;
    }
    d = max(abs(x[a] - x[b]), abs(y[a] - y[b]));

    // REP(i,n) cout << i << "  " << x[i] << " " << y[i] << endl;

    REP(i,n){
        xtoy[x[i]].insert(PL(y[i], i));
        ytox[y[i]].insert(PL(x[i], i));
    }

    dfs(a);

    // REP(i,n) cout << visit[i] << " ";
    // cout << endl;

    REP(i,n){
        if (!visit[i]) continue;
        xtoy2[x[i]].push_back(y[i]);
        ytox2[y[i]].push_back(x[i]);
    }

    // cout << "x" << endl;
    for (auto &p : xtoy2){
        sort(ALL(p.second));
        // cout << p.first << "   ";
        // for (int h : p.second) cout << h << " ";
        // cout << endl;
    }
    // cout << "y" << endl;
    for (auto &p : ytox2){
        sort(ALL(p.second));
        // cout << p.first << "   ";
        // for (int h : p.second) cout << h << " ";
        // cout << endl;
    }

    ll ans = 0;
    REP(i,n){
        // cout << "  " << i << endl;
        if (!visit[i]) continue;
        ans += countx(x[i] + d, y[i]);
        ans += countx(x[i] - d, y[i]);
        ans += county(y[i] + d, x[i]);
        ans += county(y[i] - d, x[i]);
        // cout << ans << endl;
    }

    cout << ans / 2 << endl;

    return 0;
}


Measured memory_bytes: 67712