#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
const double PI = 3.141592653589793238;
const double EPS = 1e-10;
typedef pair<ll, ll> Pos;
typedef pair<Pos, int> P;
ll x[100000], y[100000];
set<int> S;
set<P> V, RV;
vector<Pos> Vec, RVec;
ll D;
void dfs(int v) {
	S.insert(v);
	V.erase(P(Pos(x[v], y[v]), v));
	RV.erase(P(Pos(y[v], x[v]), v));
	while (1) {
		auto l = V.lower_bound(P(Pos(x[v] + D, y[v] - D), 0));
		auto r = V.upper_bound(P(Pos(x[v] + D, y[v] + D), 1 << 30));
		if (l != r) {
			dfs(l->second);
			continue;
		}
		l = V.lower_bound(P(Pos(x[v] - D, y[v] - D), 0));
		r = V.upper_bound(P(Pos(x[v] - D, y[v] + D), 0));
		if (l != r) {
			dfs(l->second);
			continue;
		}
		l = RV.lower_bound(P(Pos(y[v] + D, x[v] - D), 0));
		r = RV.upper_bound(P(Pos(y[v] + D, x[v] + D), 0));
		if (l != r) {
			dfs(l->second);
			continue;
		}
		l = RV.lower_bound(P(Pos(y[v] - D, x[v] - D), 0));
		r = RV.upper_bound(P(Pos(y[v] - D, x[v] + D), 0));
		if (l != r) {
			dfs(l->second);
			continue;
		}
		break;
	}
}
int main() {
	int N, a, b;
	cin >> N >> a >> b;
	a--; b--;
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> y[i];
		ll X = x[i] - y[i];
		ll Y = x[i] + y[i];
		x[i] = X;
		y[i] = Y;
		V.insert(P(Pos(x[i], y[i]), i));
		RV.insert(P(Pos(y[i], x[i]), i));
		Vec.emplace_back(x[i], y[i]);
		RVec.emplace_back(y[i], x[i]);
	}
	sort(Vec.begin(), Vec.end());
	sort(RVec.begin(), RVec.end());
	D = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
	dfs(a);
	ll ans = 0;
	for (int v : S) {
		ll cnt = 0;
		auto l = lower_bound(Vec.begin(), Vec.end(), Pos(x[v] + D, y[v] - D));
		auto r = upper_bound(Vec.begin(), Vec.end(), Pos(x[v] + D, y[v] + D));
		cnt += r - l;
		l = lower_bound(Vec.begin(), Vec.end(), Pos(x[v] - D, y[v] - D));
		r= upper_bound(Vec.begin(), Vec.end(), Pos(x[v] - D, y[v] + D));
		cnt += r - l;
		l = upper_bound(RVec.begin(), RVec.end(), Pos(y[v] + D, x[v] - D));
		r = lower_bound(RVec.begin(), RVec.end(), Pos(y[v] + D, x[v] + D));
		cnt += r - l;
		l = upper_bound(RVec.begin(), RVec.end(), Pos(y[v] - D, x[v] - D));
		r = lower_bound(RVec.begin(), RVec.end(), Pos(y[v] - D, x[v] + D));
		cnt += r - l;
		ans += cnt;
	}
	ans /= 2;
	cout << ans << endl;
}