#include<bits/stdc++.h>
#define rep(i, n) for(int i=0;i<(n);++i)
#define per(i, n) for(int i=(n)-1;i>=0;--i)
#define repa(i, n) for(int i=1;i<(n);++i)
#define foreach(i, n) for(auto &i:(n))
#define pii pair<int, int>
#define pll pair<long long, long long>
#define all(x) (x).begin(), (x).end()
#define bit(x) (1ll << (x))
#define int long long
using namespace std;
using ll = long long;
const ll MOD = (ll)1e9+7;
//const ll MOD = 998244353;
//const ll MOD = 924844033;
const int INF = (ll)1e9+7;
const ll INFLL = (ll)1e18;
const double EPS = 1e-5;
using namespace std;
template<class t>
using vvector = vector<vector<t>>;
template<class t>
using vvvector = vector<vector<vector<t>>>;
template<class t>
using priority_queuer = priority_queue<t, vector<t>, greater<t>>;
template<class t, class u> bool chmax(t &a, u b){if(a<b){a=b;return true;}return false;}
template<class t, class u> bool chmin(t &a, u b){if(a>b){a=b;return true;}return false;}

#ifdef DEBUG
#define OUTPUT(x) (output(x), outendl())
#else
#define OUTPUT(x) (void)0
#endif

ll modpow(ll x, ll b){
	ll res = 1;
	while(b){
		if(b&1)res = res * x % MOD;
		x = x * x % MOD;
		b>>=1;
	}
	return res;
}

ll modinv(ll x){
	return modpow(x, MOD-2);
}

bool was_output = false;
template<class t>
void output(t a){
	if(was_output)cout << " ";
	cout << a;
	was_output = true;
}
void outendl(){
	was_output = false;
	cout << endl;
}

int n;
int a,b;
int dis;
vector<bool> used;
vector<pll> line;
map<int,map<int,int>> ma;
map<int,map<int,int>> mb;
map<int,vector<int>> ma2;
map<int,vector<int>> mb2;

ll cul_a(pll x){
    return x.first + x.second;
}

ll cul_b(pll x){
    return x.first - x.second;
}

void search(int x){
    if(used[x])return;
    used[x] = true;
    while(true){
        bool flag = false;
        auto itr = ma[cul_a(line[x])-dis].lower_bound(cul_b(line[x])-dis);
        if(itr!=ma[cul_a(line[x])-dis].end()&&abs(itr->first-cul_b(line[x]))<=dis){
            flag = true;
            int d = itr->second;
            ma[cul_a(line[x])-dis].erase(itr);
            search(d);
        }
        itr = ma[cul_a(line[x])+dis].lower_bound(cul_b(line[x])-dis);
        if(itr!=ma[cul_a(line[x])+dis].end()&&abs(itr->first-cul_b(line[x]))<=dis){
            flag = true;
            int d = itr->second;
            ma[cul_a(line[x])+dis].erase(itr);
            search(d);
        }
        itr = mb[cul_b(line[x])-dis].lower_bound(cul_a(line[x])-dis);
        if(itr!=mb[cul_b(line[x])-dis].end()&&abs(itr->first-cul_a(line[x]))<=dis){
            flag = true;
            int d = itr->second;
            mb[cul_b(line[x])-dis].erase(itr);
            search(d);
        }
        itr = mb[cul_b(line[x])+dis].lower_bound(cul_a(line[x])-dis);
        if(itr!=mb[cul_b(line[x])+dis].end()&&abs(itr->first-cul_a(line[x]))<=dis){
            flag = true;
            int d = itr->second;
            mb[cul_b(line[x])+dis].erase(itr);
            search(d);
        }
        if(!flag)break;
    }
}

signed main(){
    cin >> n >> a >> b;
    --a;
    --b;
    used.resize(n,false);
    line.resize(n);
    rep(i,n){
        cin >> line[i].first >> line[i].second;
        ma[cul_a(line[i])][cul_b(line[i])] = i;
        mb[cul_b(line[i])][cul_a(line[i])] = i;
        ma2[cul_a(line[i])].push_back(cul_b(line[i]));
        mb2[cul_b(line[i])].push_back(cul_a(line[i]));
    }
    dis = 0;
    chmax(dis,abs(cul_a(line[a])-cul_a(line[b])));
    chmax(dis,abs(cul_b(line[a])-cul_b(line[b])));
    search(a);
    search(b);
    foreach(i,ma2){
        i.second.push_back(INFLL);
        sort(all(i.second));
    }
    foreach(i,mb2){
        i.second.push_back(INFLL);
        sort(all(i.second));
    }
    ll ans = 0;
    rep(i,n){
        if(!used[i])continue;
        int npa = cul_a(line[i]);
        int npb = cul_b(line[i]);
        if(ma2.count(npa-dis)){
            int st = lower_bound(all(ma2[npa-dis]),npb-dis) - ma2[npa-dis].begin();
            int ed = upper_bound(all(ma2[npa-dis]),npb+dis) - ma2[npa-dis].begin();
            ans += ed - st;
        }
        if(ma2.count(npa+dis)){
            int st = lower_bound(all(ma2[npa+dis]),npb-dis) - ma2[npa+dis].begin();
            int ed = upper_bound(all(ma2[npa+dis]),npb+dis) - ma2[npa+dis].begin();
            ans += ed - st;
        }

        if(mb2.count(npb-dis)){
            int st = lower_bound(all(mb2[npb-dis]),npa-dis) - mb2[npb-dis].begin();
            int ed = upper_bound(all(mb2[npb-dis]),npa+dis) - mb2[npb-dis].begin();
            ans += ed - st;
        }

        if(mb2.count(npb+dis)){
            int st = lower_bound(all(mb2[npb+dis]),npa-dis) - mb2[npb+dis].begin();
            int ed = upper_bound(all(mb2[npb+dis]),npa+dis) - mb2[npb+dis].begin();
            ans += ed - st;
        }
    }
    //x or y kaburi hiku
    set<pll> s;
    rep(i,n){
        if(!used[i])continue;
        s.insert(line[i]);
    }
    int mx[] = {1,0,-1,0};
    int my[] = {0,1,0,-1};
    foreach(i,s){
        rep(j,4){
            if(s.count(pll(i.first+mx[j]*dis,i.second+my[j]*dis))){
                --ans;
            }
        }
    }
    cout << ans / 2 << endl;
}


Measured memory_bytes: 73728