#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <cctype>
#define LL long long
const int maxn = 1e5 + 5;
using namespace std;
inline int read(){
	int x = 0; char ch = getchar();
	while (!isdigit(ch)) ch = getchar();
	while (isdigit(ch)) x = (x * 10) + (ch & 15), ch = getchar();
	return x;
}
vector <pair<int, int> > X[maxn], Y[maxn];
set <pair<int, int> > sx[maxn], sy[maxn];
int n, s1, s2, d, mx, my;
int x[maxn], y[maxn], lx[maxn], ly[maxn], ox[maxn], oy[maxn];
LL ans = 0;
queue <int> q;
bool vis[maxn];
pair<int, int> addx(int l, int f){
	set <pair<int, int> >::iterator it = sx[l].lower_bound(make_pair(oy[f] - d, 0));
	ans += 1ll * (upper_bound(X[l].begin(), X[l].end(), make_pair(oy[f] + d, n)) - lower_bound(X[l].begin(), X[l].end(), make_pair(oy[f] - d, 0)));
	while (oy[it->second] <= oy[f] + d && it != sx[l].end()){
		if (!vis[it->second]) q.push(it->second), vis[it->second] = 1;
		it = sx[l].erase(it);
	}
	auto p1 = lower_bound(X[l].begin(), X[l].end(), make_pair(oy[f] - d, 0));
	auto p2 = lower_bound(X[l].begin(), X[l].end(), make_pair(oy[f] + d, 0));
	return make_pair(p1 == X[l].end() ? 0 : p1->second, p2 == X[l].end() ? 0 : p2->second);
}
pair<int, int> addy(int c, int f){
	set <pair<int, int> >::iterator it = sy[c].lower_bound(make_pair(ox[f] - d, 0));
	ans += 1ll * (upper_bound(Y[c].begin(), Y[c].end(), make_pair(ox[f] + d, n)) - lower_bound(Y[c].begin(), Y[c].end(), make_pair(ox[f] - d, 0)));
	while (ox[it->second] <= ox[f] + d && it != sy[c].end()){
		if (!vis[it->second]) q.push(it->second), vis[it->second] = 1;
		it = sy[c].erase(it);
	}
	auto p1 = lower_bound(Y[c].begin(), Y[c].end(), make_pair(ox[f] - d, 0));
	auto p2 = lower_bound(Y[c].begin(), Y[c].end(), make_pair(ox[f] + d, 0));
	return make_pair(p1 == Y[c].end() ? 0 : p1->second, p2 == Y[c].end() ? 0 : p2->second);
}
void bfs(){
	q.push(s1); vis[s1] = 1;
	while (!q.empty()){
		int cur = q.front(); q.pop();
		int l1 = lower_bound(lx + 1, lx + mx + 1, ox[cur] - d) - lx;
		int l2 = lower_bound(lx + 1, lx + mx + 1, ox[cur] + d) - lx;
		int c1 = lower_bound(ly + 1, ly + my + 1, oy[cur] - d) - ly;
		int c2 = lower_bound(ly + 1, ly + my + 1, oy[cur] + d) - ly;
		bool f1 = (lx[l1] == ox[cur] - d), f2 = (lx[l2] == ox[cur] + d);
		bool f3 = (ly[c1] == oy[cur] - d), f4 = (ly[c2] == oy[cur] + d);
		pair <int, int> p1, p2, p3, p4;
		if (f1) p1 = addx(l1, cur);
		if (f2) p2 = addx(l2, cur);
		if (f3) p3 = addy(c1, cur);
		if (f4) p4 = addy(c2, cur);
		if (p1.first && p3.first && p1.first == p3.first) --ans;
		if (p1.second && p4.first && p1.second == p4.first) --ans;
		if (p2.first && p3.second && p2.first == p3.second) --ans;
		if (p2.second && p4.second && p2.second == p4.second) --ans;
	}
}
int _abs(int x){
	return x < 0 ? -x : x;
}
int main(){
	scanf("%d%d%d", &n, &s1, &s2);
	for (int a, b, i = 1; i <= n; i++){
		a = read(), b = read();
		x[i] = a - b; y[i] = a + b;
		ox[i] = x[i], oy[i] = y[i];
		lx[i] = x[i], ly[i] = y[i];
	}
	sort(lx + 1, lx + n + 1); sort(ly + 1, ly + n + 1);
	mx = unique(lx + 1, lx + n + 1) - (lx + 1);
	my = unique(ly + 1, ly + n + 1) - (ly + 1);
//	for (int i = 1; i <= mx; i++) printf("%d ", lx[i]); puts("");
//	for (int i = 1; i <= my; i++) printf("%d ", ly[i]); puts("");
	for (int i = 1; i <= n; i++){
		x[i] = lower_bound(lx + 1, lx + mx + 1, x[i]) - lx;
		y[i] = lower_bound(ly + 1, ly + my + 1, y[i]) - ly;
		X[x[i]].push_back(make_pair(oy[i], i));
		Y[y[i]].push_back(make_pair(ox[i], i));
		sx[x[i]].insert(make_pair(oy[i], i));
		sy[y[i]].insert(make_pair(ox[i], i));
	}
	for (int i = 1; i <= mx; i++) sort(X[i].begin(), X[i].end());
	for (int i = 1; i <= my; i++) sort(Y[i].begin(), Y[i].end());
	d = max(_abs(ox[s1] - ox[s2]), _abs(oy[s1] - oy[s2]));
	bfs();
	printf("%lld\n", ans / 2ll);
	return 0;
}

Measured memory_bytes: 31616