#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef pair<double, long long> pdl;

#define rep(i, n) for(int i = 0;i < n;i++)
#define pb push_back
#define mp make_pair
#define mod 1000000007

pll coor[1<<20];

set<pll> sx, sy;
map<pll, int> coor2num; // coordinate to node number

int main() {
    int n,a,b;ll x,y;
    cin>>n>>a>>b;

    rep(i, n) {
        cin>>x>>y;
        coor[i+1] = mp(x-y, x+y);
        coor2num[coor[i+1]] = i+1;
        sx.insert(mp(x-y, x+y));
        sy.insert(mp(x+y, x-y));
    }

    ll D = max(abs(coor[a].first-coor[b].first),
               abs(coor[a].second-coor[b].second));

    queue<int> q;
    q.push(a);

    vector<bool> visited(1<<20, false);

    while(not q.empty()) {
        int h = q.front();q.pop();

        if(visited[h]) continue;

        visited[h] = true;

        ll x = coor[h].first;
        ll y = coor[h].second;

        auto it = sx.lower_bound(mp(x+D, y-D));

        for(;it != sx.end();) {
            if(it->first != x+D or (it->second > y+D)) break;
            q.push(coor2num[*it]);
            sy.erase(mp(it->second, it->first));
            it = sx.erase(it);
        }

        it = sx.lower_bound(mp(x-D, y-D));

        for(;it != sx.end();) {
            if(it->first != x-D or (it->second > y+D)) break;
            q.push(coor2num[*it]);
            sy.erase(mp(it->second, it->first));
            it = sx.erase(it);
        }

        it = sy.lower_bound(mp(y+D, x-D));

        for(;it != sy.end();) {
            if(it->first != y+D or (it->second > x+D)) break;
            q.push(coor2num[mp(it->second, it->first)]);
            sx.erase(mp(it->second, it->first));
            it = sy.erase(it);
        }

        it = sy.lower_bound(mp(y-D, x-D));

        for(;it != sy.end();) {
            if(it->first != y-D or (it->second > x+D)) break;
            q.push(coor2num[mp(it->second, it->first)]);
            sx.erase(mp(it->second, it->first));
            it = sy.erase(it);
        }

        sx.erase(mp(x, y));
        sy.erase(mp(y, x));
    }

    vector<pll> vx(1<<20), vy(1<<20);
    rep(i, n) {
        ll x = coor[i+1].first;
        ll y = coor[i+1].second;
        vx[i+1] = mp(x,y);
        vy[i+1] = mp(y,x);
    }

    sort(vx.begin()+1, vx.begin()+n+1);
    sort(vy.begin()+1, vy.begin()+n+1);

    ll ans = 0;
    for(int i=1;i<=n;i++) {
        if(visited[i]) {
            ll x = coor[i].first;
            ll y = coor[i].second;

            auto it1 = lower_bound(vx.begin()+1, vx.begin()+n+1, mp(x+D, y-D));
            auto it2 = upper_bound(vx.begin()+1, vx.begin()+n+1, mp(x+D, y+D));
            if(it1 <= it2) ans += it2-it1;

            it1 = lower_bound(vx.begin()+1, vx.begin()+n+1, mp(x-D, y-D));
            it2 = upper_bound(vx.begin()+1, vx.begin()+n+1, mp(x-D, y+D));
            if(it1 <= it2) ans += it2-it1;

            it1 = lower_bound(vy.begin()+1, vy.begin()+n+1, mp(y+D, x-D));
            it2 = upper_bound(vy.begin()+1, vy.begin()+n+1, mp(y+D, x+D));
            if(it1 <= it2) ans += it2-it1;

            it1 = lower_bound(vy.begin()+1, vy.begin()+n+1, mp(y-D, x-D));
            it2 = upper_bound(vy.begin()+1, vy.begin()+n+1, mp(y-D, x+D));
            if(it1 <= it2) ans += it2-it1;

            if(coor2num.find(mp(x+D, y+D)) != coor2num.end()) ans--;
            if(coor2num.find(mp(x-D, y+D)) != coor2num.end()) ans--;
            if(coor2num.find(mp(x+D, y-D)) != coor2num.end()) ans--;
            if(coor2num.find(mp(x-D, y-D)) != coor2num.end()) ans--;

        }
    }

    cout<<ans/2;

    return 0;
}


Measured memory_bytes: 53760