#include<set>
#include<queue>
#include<cstdio>
#include<algorithm>
using namespace std;
const int MAXN = 200000;
const long long INF = 1000000000;
struct node{
	long long x, y;
	long long id;
}pnt[MAXN + 5];
struct node1{
	long long key; long long id;
	node1(long long k, long long i):key(k), id(i){}
};
bool operator < (node1 a, node1 b) {
	return a.key < b.key;
}
long long p[2*MAXN + 5]; long long pcnt = 0;
set<node1>sx[2*MAXN + 5], sy[2*MAXN + 5];
vector<long long>s1[2*MAXN + 5], s2[2*MAXN + 5];
set<node1>::iterator it1, it2;
long long GetX(long long x, long long y) {
	return (x + y) / 2;
}
long long GetY(long long x, long long y) {
	return (y - x) / 2;
}
bool vis[MAXN + 5];
int main() {
	long long N, a, b;
	scanf("%lld%lld%lld", &N, &a, &b);
	for(long long i=1;i<=N;i++) {
		long long x, y;
		scanf("%lld%lld", &x, &y);
		pnt[i].x = x - y, pnt[i].y = x + y;
		p[++pcnt] = pnt[i].x, p[++pcnt] = pnt[i].y;
		pnt[i].id = i;
	}
	long long dis = abs(GetX(pnt[a].x, pnt[a].y) - GetX(pnt[b].x, pnt[b].y)) + abs(GetY(pnt[a].x, pnt[a].y) - GetY(pnt[b].x, pnt[b].y));
	sort(p+1, p+pcnt+1);
	pcnt = unique(p+1, p+pcnt+1) - p - 1;
	for(long long i=1;i<=N;i++) {
		pnt[i].x = lower_bound(p+1, p+pcnt+1, pnt[i].x) - p;
		pnt[i].y = lower_bound(p+1, p+pcnt+1, pnt[i].y) - p;
		sx[pnt[i].x].insert(node1(p[pnt[i].y], i));
		sy[pnt[i].y].insert(node1(p[pnt[i].x], i));
		s1[pnt[i].x].push_back(p[pnt[i].y]);
		s2[pnt[i].y].push_back(p[pnt[i].x]);
	}
	for(long long i=0;i<=2*MAXN;i++) {
		s1[i].push_back(4*INF+5); s1[i].push_back(-4*INF-5);
		s2[i].push_back(4*INF+5); s2[i].push_back(-4*INF-5);
		sort(s1[i].begin(), s1[i].end());
		sort(s2[i].begin(), s2[i].end());
		sx[i].insert(node1(4*INF+5, 1)); sx[i].insert(node1(-4*INF-5, 1));
		sy[i].insert(node1(4*INF+5, 1)); sy[i].insert(node1(-4*INF-5, 1));
	}
	queue<long long>que; que.push(a); que.push(b);
	sx[pnt[a].x].erase(node1(p[pnt[a].y], a)); sy[pnt[a].y].erase(node1(p[pnt[a].x], a));
	sx[pnt[b].x].erase(node1(p[pnt[b].y], b)); sy[pnt[b].y].erase(node1(p[pnt[b].x], b));
	long long ans = 0; vis[a] = vis[b] = true;
	while( !que.empty() ) {
		long long f = que.front(); que.pop();
		long long *q = lower_bound(p+1, p+pcnt+1, p[pnt[f].x]+dis);
		if( q-p != pcnt+1 && *q == p[pnt[f].x]+dis ) {
			long long r = q - p;
			ans += upper_bound(s1[r].begin(), s1[r].end(), p[pnt[f].y]+dis) - lower_bound(s1[r].begin(), s1[r].end(), p[pnt[f].y]-dis);
			while( sx[r].lower_bound(node1(p[pnt[f].y]-dis, 1))->key <= p[pnt[f].y]+dis ) {
				it1 = sx[r].lower_bound(node1(p[pnt[f].y]-dis, 1));
				if( !vis[it1->id]) que.push(it1->id), vis[it1->id] = true;
				sy[pnt[it1->id].y].erase(node1(p[pnt[it1->id].x], it1->id));
				sx[r].erase(it1);
			}
		}
		q = lower_bound(p+1, p+pcnt+1, p[pnt[f].x]-dis);
		if( q-p != pcnt+1 && *q == p[pnt[f].x]-dis ) {
			long long r = q - p;
			ans += upper_bound(s1[r].begin(), s1[r].end(), p[pnt[f].y]+dis) - lower_bound(s1[r].begin(), s1[r].end(), p[pnt[f].y]-dis);
			while( sx[r].lower_bound(node1(p[pnt[f].y]-dis, 1))->key <= p[pnt[f].y]+dis ) {
				it1 = sx[r].lower_bound(node1(p[pnt[f].y]-dis, 1));
				if( !vis[it1->id] ) que.push(it1->id), vis[it1->id] = true;
				sy[pnt[it1->id].y].erase(node1(p[pnt[it1->id].x], it1->id));
				sx[r].erase(it1);
			}
		}
		q = lower_bound(p+1, p+pcnt+1, p[pnt[f].y]+dis);
		if( q-p != pcnt+1 && *q == p[pnt[f].y]+dis ) {
			long long r = q - p;
			ans += upper_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]+dis) - lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]-dis);
			if( *lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]-dis) == p[pnt[f].x]-dis )
				ans--;
			if( *lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]+dis) == p[pnt[f].x]+dis )
				ans--;
			while( sy[r].lower_bound(node1(p[pnt[f].x]-dis, 1))->key <= p[pnt[f].x]+dis ) {
				it1 = sy[r].lower_bound(node1(p[pnt[f].x]-dis, 1));
				if( !vis[it1->id] ) que.push(it1->id), vis[it1->id] = true;
				sx[pnt[it1->id].x].erase(node1(p[pnt[it1->id].y], it1->id));
				sy[r].erase(it1);
			}
		}
		q = lower_bound(p+1, p+pcnt+1, p[pnt[f].y]-dis);
		if( q-p != pcnt+1 && *q == p[pnt[f].y]-dis ) {
			long long r = q - p;
			ans += upper_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]+dis) - lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]-dis);
			if( *lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]-dis) == p[pnt[f].x]-dis )
				ans--;
			if( *lower_bound(s2[r].begin(), s2[r].end(), p[pnt[f].x]+dis) == p[pnt[f].x]+dis )
				ans--;
			while( sy[r].lower_bound(node1(p[pnt[f].x]-dis, 1))->key <= p[pnt[f].x]+dis ) {
				it1 = sy[r].lower_bound(node1(p[pnt[f].x]-dis, 1));
				if( !vis[it1->id] ) que.push(it1->id), vis[it1->id] = true;
				sx[pnt[it1->id].x].erase(node1(p[pnt[it1->id].y], it1->id));
				sy[r].erase(it1);
			}
		}
	}
	printf("%lld\n", ans/2);
}

Measured memory_bytes: 204152