#include <bits/stdc++.h>

#define MAXN (200010)
#define ll long long

int n, a, b;
ll dis, x[MAXN], y[MAXN];
std::map<ll, std::set<std::pair<ll, int> > > mappls;
std::map<ll, std::set<std::pair<ll, int> > > mapsub;
std::map<ll, std::vector<ll> > mappls2;
std::map<ll, std::vector<ll> > mapsub2;
std::map<std::pair<ll, ll>, int> map3;
std::vector<int> conn;

template <class T> void readin(T &x,bool mark = 0){
    char tt = getchar();
	for(; tt < '0' || '9' < tt; tt = getchar()){
	    if(tt == '-'){
		    mark = 1;
		}
	}
	for(x = 0; '0' <= tt && tt <= '9'; x = x * 10 + tt - '0', tt = getchar())
	    ;
	x = mark ? - x : x;
}

ll getDis(int i, int j){
	return std::abs(x[i] - x[j]) + std::abs(y[i] - y[j]);
}

void deleteMap(int v){
	mapsub[x[v] - y[v]].erase({x[v], v});
	mappls[x[v] + y[v]].erase({x[v], v});
}

int main(){
	scanf("%d%d%d", &n, &a, &b);
	for(int i = 1; i <= n; ++ i){
		readin(x[i]); readin(y[i]);
		mappls[x[i] + y[i]].insert({x[i], i});
		mapsub[x[i] - y[i]].insert({x[i], i});
		mappls2[x[i] + y[i]].push_back(x[i]);
		mapsub2[x[i] - y[i]].push_back(x[i]);
		map3[{x[i], y[i]}] = 1;
	}
	dis = getDis(a, b);
	std::queue<int> que;
	que.push(a);
	que.push(b);
	deleteMap(a);
	deleteMap(b);
	while(!que.empty()){
		int u = que.front();
		conn.push_back(u);
		que.pop();
		//
		for(auto it = mapsub[(x[u] - dis) - y[u]].lower_bound({x[u] - dis, 0}); it != mapsub[(x[u] - dis) - y[u]].end() && it -> first <= x[u]; ){
		    int v = it -> second;
		    que.push(v);
		    deleteMap(v);
		    it = mapsub[(x[u] - dis) - y[u]].lower_bound({x[u] - dis, 0});
		}
		//
		for(auto it = mapsub[x[u] - (y[u] - dis)].lower_bound({x[u], 0}); it != mapsub[x[u] - (y[u] - dis)].end() && it -> first <= x[u] + dis; ){
		    int v = it -> second;
		    que.push(v);
		    deleteMap(v);
		    it = mapsub[x[u] - (y[u] - dis)].lower_bound({x[u], 0});
		}
		//
		for(auto it = mappls[x[u] + (y[u] + dis)].lower_bound({x[u], 0}); it != mappls[x[u] + (y[u] + dis)].end() && it -> first <= x[u] + dis; ){
		    int v = it -> second;
		    que.push(v);
		    deleteMap(v);
		    it = mappls[x[u] + (y[u] + dis)].lower_bound({x[u], 0});
		}
		//
		for(auto it = mappls[x[u] + (y[u] - dis)].lower_bound({x[u] - dis, 0}); it != mappls[x[u] + (y[u] - dis)].end() && it -> first <= x[u]; ){
		    int v = it -> second;
		    que.push(v);
		    deleteMap(v);
		    it = mappls[x[u] + (y[u] - dis)].lower_bound({x[u] - dis, 0});
		}
	}
	for(auto &u : mappls2){
		std::sort(u.second.begin(), u.second.end());
	}
	for(auto &u : mapsub2){
		std::sort(u.second.begin(), u.second.end());
	}
	ll ans = 0;
	for(auto u : conn){
		ll deg = 0;
		ll now, left, right;
		//
		now = x[u] - dis - y[u];
		if(mapsub2.count(now)){
			left = std::lower_bound(mapsub2[now].begin(), mapsub2[now].end(), x[u] - dis) - mapsub2[now].begin();
			right = std::upper_bound(mapsub2[now].begin(), mapsub2[now].end(), x[u]) - mapsub2[now].begin();
			deg += right - left;
		}
		//
		now = x[u] - y[u] + dis;
		if(mapsub2.count(now)){
			left = std::lower_bound(mapsub2[now].begin(), mapsub2[now].end(), x[u]) - mapsub2[now].begin();
			right = std::upper_bound(mapsub2[now].begin(), mapsub2[now].end(), x[u] + dis) - mapsub2[now].begin();
			deg += right - left;
		}
		//
		now = x[u] + dis + y[u];
		if(mappls2.count(now)){
			left = std::lower_bound(mappls2[now].begin(), mappls2[now].end(), x[u]) - mappls2[now].begin();
			right = std::upper_bound(mappls2[now].begin(), mappls2[now].end(), x[u] + dis) - mappls2[now].begin();
			deg += right - left;
		}
		//
		now = x[u] - dis + y[u];
		if(mappls2.count(now)){
			left = std::lower_bound(mappls2[now].begin(), mappls2[now].end(), x[u] - dis) - mappls2[now].begin();
			right = std::upper_bound(mappls2[now].begin(), mappls2[now].end(), x[u]) - mappls2[now].begin();
			deg += right - left;
		}
		
		deg -= map3[{x[u], y[u] + dis}];
		deg -= map3[{x[u] - dis, y[u]}];
		deg -= map3[{x[u], y[u] - dis}];
		deg -= map3[{x[u] + dis, y[u]}];
		
		ans += deg;
	}
	std::cout << ans / 2 << std::endl;
	return 0;
}

Measured memory_bytes: 87800