#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
typedef long long ll;
ll D;
set<pair<ll, ll>> S0, S1, S2;
vector<pair<ll, ll>> V0, V1;
void f(ll x, ll y) {
	if (!S2.insert({x,y}).second) return;
	vector<pair<ll, ll>> S3;
	for (auto i = S0.lower_bound({x - D, y - D}); i != S0.end(); ++i) {
		if (i->first != x - D || i->second > y + D) break;
		S3.push_back(*i);
	}
	for (auto i = S0.lower_bound({x + D, y - D}); i != S0.end(); ++i) {
		if (i->first != x + D || i->second > y + D) break;
		S3.push_back(*i);
	}
	for (auto i = S1.lower_bound({y - D, x - D}); i != S1.end(); ++i) {
		if (i->first != y - D || i->second > x + D) break;
		S3.push_back({i->second, i->first});
	}
	for (auto i = S1.lower_bound({y + D, x - D}); i != S1.end(); ++i) {
		if (i->first != y + D || i->second > x + D) break;
		S3.push_back({i->second, i->first});
	}
	for (auto p : S3) {
		S0.erase({p.first, p.second});
		S1.erase({p.second, p.first});
	}
	for (auto x : S3) {
		f(x.first, x.second);
	}
}
ll g(ll x, ll y) {
	ll r = 0;
	{
		auto i = lower_bound(V0.begin(), V0.end(), make_pair(x - D, y - D));
		auto j = upper_bound(V0.begin(), V0.end(), make_pair(x - D, y + D));
		r += j - i;
	}
	{
		auto i = lower_bound(V0.begin(), V0.end(), make_pair(x + D, y - D));
		auto j = upper_bound(V0.begin(), V0.end(), make_pair(x + D, y + D));
		r += j - i;
	}
	{
		auto i = upper_bound(V1.begin(), V1.end(), make_pair(y - D, x - D));
		auto j = lower_bound(V1.begin(), V1.end(), make_pair(y - D, x + D));
		r += j - i;
	}
	{
		auto i = upper_bound(V1.begin(), V1.end(), make_pair(y + D, x - D));
		auto j = lower_bound(V1.begin(), V1.end(), make_pair(y + D, x + D));
		r += j - i;
	}
	return r;
}
int main() {
	int N, A, B;
	cin >> N >> A >> B;
	--A; --B;
	vector<ll> X(N), Y(N);
	for (int i = 0; i < N; ++i) {
		int x, y;
		cin >> x >> y;
		X[i] = x + y;
		Y[i] = x - y;
		S0.insert({X[i], Y[i]});
		S1.insert({Y[i], X[i]});
	}
	V0 = vector<pair<ll, ll>>(S0.begin(), S0.end());
	V1 = vector<pair<ll, ll>>(S1.begin(), S1.end());
	D = max(abs(X[A] - X[B]), abs(Y[A] - Y[B]));
	f(X[A], Y[A]);
	ll r = 0;
	for (auto x : S2) {
		r += g(x.first, x.second);
	}
	cout << r / 2 << endl;
}
