#include <cmath>
#include <map>
#include <vector>
#include <cstdio>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
typedef long long ll;
const int maxn = 300010;
#define rep(i, a, b) for (int i = a; i <= b; ++ i)
using namespace std;
int fa[maxn], c[maxn], d[maxn], n, f[maxn], cnt, rt[maxn];
struct epoch { int x, y, id; } a[maxn];
struct tnode { int l, r, cov, tag; } tr[maxn * 20];
bool cmp1(epoch a, epoch b) { return (a.x < b.x || (a.x == b.x && a.y < b.y)); }
bool cmp2(epoch a, epoch b) { return (a.x < b.x || (a.x == b.x && a.y > b.y)); }
void pre() {
	c[0] = d[0] = 0;
	rep(i, 1, n) c[++ c[0]] = a[i].x + a[i].y, c[++ c[0]] = a[i].x - a[i].y, c[++ c[0]] = a[i].y;
	sort(c + 1, c + c[0] + 1);
	for (int i = 1, j; i <= c[0]; i = j) {
		d[++ d[0]] = c[i];
		for (j = i + 1; j <= c[0] && c[i] == c[j]; ++ j);
	}
}
int findmx(int ave) {
	int l = 1, r = d[0], ans = d[0] + 1;
	while (l <= r) {
		int mid = (l + r) / 2;
		if (d[mid] >= ave) ans = mid, r = mid - 1;
			else l = mid + 1;
	}
	return ans;
}
int findmn(int ave) {
	int l = 1, r = d[0], ans = 0;
	while (l <= r) {
		int mid = (l + r) / 2;
		if (d[mid] <= ave) ans = mid, l = mid + 1;
			else r = mid - 1;
	}
	return ans;
}
int find(int ave) {
	int l = 1, r = d[0], ans = 0;
	while (l <= r) {
		int mid = (l + r) / 2;
		if (d[mid] == ave) return mid;
		if (d[mid] < ave) l = mid + 1;
			else r = mid - 1;
	}
	return ans;
}
int getfa(int x) {
	if (fa[x] == x) return x;
	return fa[x] = getfa(fa[x]);
}
void merge(int x, int y) {
	x = getfa(x), y = getfa(y);
	if (x != y) fa[x] = y;
}
void psd(int p) {
	int l = tr[p].l, r = tr[p].r;
	if (!tr[p].tag) return ;
	if (l) {
		if (tr[l].tag) merge(tr[l].tag, tr[p].tag); else tr[l].tag = tr[p].tag;
	}
	if (r) {
		if (tr[r].tag) merge(tr[r].tag, tr[p].tag); else tr[r].tag = tr[p].tag;
	}
	tr[p].tag = 0;
}
void insert(int &p, int l, int r, int pos, int from) {
	if (pos < l || pos > r) return ;
	if (!p) p = ++ cnt, tr[p].cov = tr[p].tag = tr[p].l = tr[p].r = 0;
	++ tr[p].cov;
	if (l == r) {
		tr[p].tag = from;
		return ;
	}
	int mid = (l + r) / 2;
	if (pos <= mid) insert(tr[p].l, l, mid, pos, from);
		else insert(tr[p].r, mid + 1, r, pos, from);
}
void modify(int p, int l, int r, int lx, int rx, int from) {
	if (lx > rx || !p) return ;
	if (l == lx && r == rx) {
		if (tr[p].tag) merge(tr[p].tag, from); else tr[p].tag = from;
		f[from] += tr[p].cov;
		return ;
	}
	int mid = (l + r) / 2; psd(p);
	if (rx <= mid) modify(tr[p].l, l, mid, lx, rx, from); else
	if (lx > mid) modify(tr[p].r, mid + 1, r, lx, rx, from); else
	modify(tr[p].l, l, mid, lx, mid, from), modify(tr[p].r, mid + 1, r, mid + 1, rx, from);
}
void query(int p, int l, int r, int pos) {
	if (!p) return ;
	if (l == r) return ;
	int mid = (l + r) / 2; psd(p);
	if (pos <= mid) query(tr[p].l, l, mid, pos);
		else query(tr[p].r, mid + 1, r, pos);
}
int main() {
	int x, y;
	scanf("%d%d%d", &n, &x, &y);
	rep(i, 1, n) fa[i] = i;
	rep(i, 1, n) scanf("%d%d", &a[i].x, &a[i].y), a[i].id = i; pre();
	int D = abs(a[x].x - a[y].x) + abs(a[x].y - a[y].y);
	sort(a + 1, a + n + 1, cmp1);
	rep(i, 1, d[0]) rt[i] = 0; cnt = 0;
	rep(i, 1, n) insert(rt[find(a[i].x + a[i].y)], 1, d[0], find(a[i].y), a[i].id);
	rep(i, 1, n) modify(rt[find(a[i].x + a[i].y - D)], 1, d[0], findmx(a[i].x + a[i].y - D - a[i].x), find(a[i].y), a[i].id);
	rep(i, 1, n) query(rt[find(a[i].x + a[i].y)], 1, d[0], find(a[i].y));
	sort(a + 1, a + n + 1, cmp2);
	rep(i, 0, d[0]) rt[i] = 0; cnt = 0;
	rep(i, 1, n) insert(rt[find(a[i].x - a[i].y)], 1, d[0], find(a[i].y), a[i].id);
	rep(i, 1, n) modify(rt[find(a[i].x - a[i].y - D)], 1, d[0], findmx(a[i].y + 1), findmn(a[i].x - 1 - (a[i].x - a[i].y - D)), a[i].id);
	rep(i, 1, n) query(rt[find(a[i].x - a[i].y)], 1, d[0], find(a[i].y));
	ll ans = 0;
	rep(i, 1, n) if (getfa(i) == getfa(x) || getfa(i) == getfa(y)) ans += f[i]; 
	printf("%lld\n", ans);
	return 0;
}

Measured memory_bytes: 34176