#include <bits/stdc++.h>

const int MAXN = 100010;
typedef long long LL;
LL xs[MAXN], ys[MAXN], D;
int n, X, Y;
typedef std::pair<LL, LL> pi;
std::map<pi, int> id;
typedef std::vector<LL> VI;
typedef std::map<LL, VI> M;
M mx, my, cx, cy;
int ansl[MAXN], fa[MAXN];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void merge(int x, int y) { fa[find(x)] = find(y); }
void chk(int x, pi y) { if (id.count(y)) --ansl[x], merge(x, id[y]); }
void con(int x, M & m, M & e, LL i, LL L, LL R, bool b) {
	if (!m.count(i)) return ;
	VI & t = m[i];
	int l = std::lower_bound(t.begin(), t.end(), L) - t.begin();
	int r = std::upper_bound(t.begin(), t.end(), R) - t.begin();
	if (l == t.size() || t[l] > R) return ;
	ansl[x] += r - l;
	merge(x, id[b ? pi(t[l], i) : pi(i, t[l])]);
	merge(x, id[b ? pi(t[r - 1], i) : pi(i, t[r - 1])]);
	e[i][l] = r - 1;
}
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	std::cin >> n >> X >> Y;
	for (int i = 1, x, y; i <= n; ++i) {
		std::cin >> x >> y;
		fa[i] = id[pi(xs[i] = x + y, ys[i] = x - y)] = i;
	}
	D = std::max(std::abs(xs[X] - xs[Y]), std::abs(ys[X] - ys[Y]));
	for (int i = 1; i <= n; ++i)
		mx[xs[i]].push_back(ys[i]), my[ys[i]].push_back(xs[i]);
	for (auto & t : mx) {
		std::sort(t.second.begin(), t.second.end());
		cx[t.first] = VI(t.second.size(), 0);
	}
	for (auto & t : my) {
		std::sort(t.second.begin(), t.second.end());
		cy[t.first] = VI(t.second.size(), 0);
	}
	for (int i = 1; i <= n; ++i) {
		con(i, mx, cx, xs[i] - D, ys[i] - D, ys[i] + D, 0);
		con(i, mx, cx, xs[i] + D, ys[i] - D, ys[i] + D, 0);
		con(i, my, cy, ys[i] - D, xs[i] - D, xs[i] + D, 1);
		con(i, my, cy, ys[i] + D, xs[i] - D, xs[i] + D, 1);
		chk(i, pi(xs[i] - D, ys[i] - D));
		chk(i, pi(xs[i] - D, ys[i] + D));
		chk(i, pi(xs[i] + D, ys[i] - D));
		chk(i, pi(xs[i] + D, ys[i] + D));
	}
	for (auto & i : cx) {
		LL x = i.first;
		VI & t = i.second; const int sz = t.size();
		for (int j = 1; j < sz; ++j) {
			t[j] = std::max(t[j], t[j - 1]);
			if (t[j - 1] > j - 1) merge(id[pi(x, mx[x][j - 1])], id[pi(x, mx[x][j])]);
		}
	}
	for (auto & i : cy) {
		LL y = i.first;
		VI & t = i.second; const int sz = t.size();
		for (int j = 1; j < sz; ++j) {
			t[j] = std::max(t[j], t[j - 1]);
			if (t[j - 1] > j - 1) merge(id[pi(my[y][j - 1], y)], id[pi(my[y][j], y)]);
		}
	}
	LL ans = 0;
	for (int i = 1; i <= n; ++i) if (find(i) == find(X)) ans += ansl[i];
	std::cout << ans / 2 << std::endl;
	return 0;
}
