#include <bits/stdc++.h>
using namespace std;

const int N = 110000;

pair<long long, long long> P[N];
pair<int, int> ind[N];

int Xn, Yn;
long long X[N], Y[N];
vector<long long> R[N], C[N];
set<pair<long long, int>> SR[N], SC[N];

int que[N], wrk[N], wrkn;

int main() {
	
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	
	int n, a, b; cin >> n >> a >> b;
	for (int i = 1; i <= n; i++) cin >> P[i].first >> P[i].second;
	long long d = abs(P[a].first - P[b].first) + abs(P[a].second - P[b].second);
	for (int i = 1; i <= n; i++) {
		long long x = P[i].first + P[i].second, y = P[i].first - P[i].second;
		P[i] = make_pair(x, y);
	}
	for (int i = 1; i <= n; i++) X[Xn++] = P[i].first, Y[Yn++] = P[i].second;
	sort(X, X + Xn), Xn = unique(X, X + Xn) - X;
	sort(Y, Y + Yn), Yn = unique(Y, Y + Yn) - Y;
	for (int i = 1; i <= n; i++) {
		int x = lower_bound(X, X + Xn, P[i].first) - X;
		int y = lower_bound(Y, Y + Yn, P[i].second) - Y;
		ind[i] = make_pair(x, y);
		R[x].push_back(P[i].second);
		C[y].push_back(P[i].first);
		SR[x].emplace(P[i].second, i);
		SC[y].emplace(P[i].first, i);
	}
	for (int i = 0; i < Xn; i++) sort(R[i].begin(), R[i].end());
	for (int i = 0; i < Yn; i++) sort(C[i].begin(), C[i].end());
	
	SR[ind[a].first].erase(make_pair(P[a].second, a));
	SC[ind[a].second].erase(make_pair(P[a].first, a));
	int hd = 0, tl = 0;
	que[tl++] = a;
	while (hd < tl) {
		int u = que[hd++];
		int pp = lower_bound(X, X + Xn, P[u].first - d) - X;
		if (pp < Xn && X[pp] == P[u].first - d) {
			auto it = SR[pp].lower_bound(make_pair(P[u].second - d, 0));
			wrkn = 0;
			while (it != SR[pp].end() && it -> first <= P[u].second + d) {
				wrk[wrkn++] = it -> second;
				it++;
			}
			for (int i = 0; i < wrkn; i++) {
				que[tl++] = wrk[i];
				SR[ind[wrk[i]].first].erase(make_pair(P[wrk[i]].second, wrk[i]));
				SC[ind[wrk[i]].second].erase(make_pair(P[wrk[i]].first, wrk[i]));
			}
		}
		pp = lower_bound(X, X + Xn, P[u].first + d) - X;
		if (pp < Xn && X[pp] == P[u].first + d) {
			auto it = SR[pp].lower_bound(make_pair(P[u].second - d, 0));
			wrkn = 0;
			while (it != SR[pp].end() && it -> first <= P[u].second + d) {
				wrk[wrkn++] = it -> second;
				it++;
			}
			for (int i = 0; i < wrkn; i++) {
				que[tl++] = wrk[i];
				SR[ind[wrk[i]].first].erase(make_pair(P[wrk[i]].second, wrk[i]));
				SC[ind[wrk[i]].second].erase(make_pair(P[wrk[i]].first, wrk[i]));
			}
		}
		int qq = lower_bound(Y, Y + Yn, P[u].second - d) - Y;
		if (qq < Yn && Y[qq] == P[u].second - d) {
			auto it = SC[qq].lower_bound(make_pair(P[u].first - d, 0));
			wrkn = 0;
			while (it != SC[qq].end() && it -> first <= P[u].first + d) {
				wrk[wrkn++] = it -> second;
				it++;
			}
			for (int i = 0; i < wrkn; i++) {
				que[tl++] = wrk[i];
				SR[ind[wrk[i]].first].erase(make_pair(P[wrk[i]].second, wrk[i]));
				SC[ind[wrk[i]].second].erase(make_pair(P[wrk[i]].first, wrk[i]));
			}
		}
		qq = lower_bound(Y, Y + Yn, P[u].second + d) - Y;
		if (qq < Yn && Y[qq] == P[u].second + d) {
			auto it = SC[qq].lower_bound(make_pair(P[u].first - d, 0));
			wrkn = 0;
			while (it != SC[qq].end() && it -> first <= P[u].first + d) {
				wrk[wrkn++] = it -> second;
				it++;
			}
			for (int i = 0; i < wrkn; i++) {
				que[tl++] = wrk[i];
				SR[ind[wrk[i]].first].erase(make_pair(P[wrk[i]].second, wrk[i]));
				SC[ind[wrk[i]].second].erase(make_pair(P[wrk[i]].first, wrk[i]));
			}
		}
	}
	
	long long ans = 0;
	for (int i = 0; i < tl; i++) {
		int ret = 0;
		int u = que[i];
		int pp = lower_bound(X, X + Xn, P[u].first - d) - X;
		int cnt = 0;
		if (pp < Xn && X[pp] == P[u].first - d) {
			auto it1 = lower_bound(R[pp].begin(), R[pp].end(), P[u].second - d);
			auto it2 = upper_bound(R[pp].begin(), R[pp].end(), P[u].second + d);
			ret += it2 - it1;
			if (it1 != R[pp].end() && (*it1) == P[u].second - d) cnt++;
			if (it2 != R[pp].begin()) {
				it2--;
				if ((*it2) == P[u].second + d) cnt++;
			}
		}
		pp = lower_bound(X, X + Xn, P[u].first + d) - X;
		if (pp < Xn && X[pp] == P[u].first + d) {
			auto it1 = lower_bound(R[pp].begin(), R[pp].end(), P[u].second - d);
			auto it2 = upper_bound(R[pp].begin(), R[pp].end(), P[u].second + d);
			ret += it2 - it1;
			if (it1 != R[pp].end() && (*it1) == P[u].second - d) cnt++;
			if (it2 != R[pp].begin()) {
				it2--;
				if ((*it2) == P[u].second + d) cnt++;
			}
		}
		int qq = lower_bound(Y, Y + Yn, P[u].second - d) - Y;
		if (qq < Yn && Y[qq] == P[u].second - d) {
			auto it1 = lower_bound(C[qq].begin(), C[qq].end(), P[u].first - d);
			auto it2 = upper_bound(C[qq].begin(), C[qq].end(), P[u].first + d);
			ret += it2 - it1;
		}
		qq = lower_bound(Y, Y + Yn, P[u].second + d) - Y;
		if (qq < Yn && Y[qq] == P[u].second + d) {
			auto it1 = lower_bound(C[qq].begin(), C[qq].end(), P[u].first - d);
			auto it2 = upper_bound(C[qq].begin(), C[qq].end(), P[u].first + d);
			ret += it2 - it1;
		}
		ret -= cnt;
		ans += ret;
	}
	
	cout << ans / 2 << "\n";
	
	return 0;
}


Measured memory_bytes: 41352