#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <unordered_map>

using namespace std;

#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

typedef long long ll;
typedef long double ld;

const ll SZ = 2e5 + 10;

vector<pair<ll, ll>> vec;
map<pair<ll, ll>, ll> ind;
bool used[SZ];
map<ll, ll> ch;
set<ll> mp1[SZ * 3], mp2[SZ * 3];
vector<ll> mp_s1[SZ * 3], mp_s2[SZ * 3];

int main() {
	fastInp;

	ll n, a, b;
	cin >> n >> a >> b;

	vector<ll> bal;
	a--; b--;

	for (int i = 0; i < n; i++) {
		ll x, y;
		cin >> x >> y;
		vec.push_back({ x, y });
	}
	ll d = abs(vec[a].first - vec[b].first) + abs(vec[a].second - vec[b].second);
	for (int i = 0; i < n; i++) {
		ll x = vec[i].first, y = vec[i].second;
		bal.push_back(x + y);
		bal.push_back(x - y);

		bal.push_back(x - d + y);
		bal.push_back(x + d + y);

		bal.push_back(x - d - y);
		bal.push_back(x + d - y);
	}
	sort(bal.begin(), bal.end());
	auto it = unique(bal.begin(), bal.end());
	bal.erase(it, bal.end());
	for (int i = 0; i < bal.size(); i++) ch[bal[i]] = i;

	
	for (int i = 0; i < n; i++) {
		ll x, y;
		x = vec[i].first;
		y = vec[i].second;
		ind[{x, y}] = i;

		mp1[ch[x + y]].insert(x);
		mp2[ch[x - y]].insert(x);

		mp_s1[ch[x + y]].push_back(x);
		mp_s2[ch[x - y]].push_back(x);
	}

	used[a] = 1;
	used[b] = 1;

	queue<ll> q;
	q.push(a);
	q.push(b);

	ll cnt = 0;
	while (!q.empty()) {
		ll v = q.front();
		q.pop();
		ll x = vec[v].first, y = vec[v].second;

		ll mnX = x - d;
		ll curB = (mnX + y);
		ll curB1 = ch[curB];
		while (mp1[curB1].lower_bound(mnX) != mp1[curB1].end() && *(mp1[curB1].lower_bound(mnX)) <= x) {
			ll vl = *(mp1[curB1].lower_bound(mnX));
			pair<ll, ll> crds = { vl, curB - vl };
			ll i = ind[{crds.first, crds.second}];
			mp1[curB1].erase(vl);
			cnt++;
			if (!used[i]) {
				used[i] = 1;
				q.push(i);
			}
		}

		ll mxX = x + d;
		curB = (mxX + y);
		curB1 = ch[curB];
		while (mp1[curB1].lower_bound(x) != mp1[curB1].end() && (*(mp1[curB1].lower_bound(x))) <= mxX) {
			ll vl = *(mp1[curB1].lower_bound(x));
			pair<ll, ll> crds = { vl, curB - vl };
			cnt++;
			ll i = ind[{crds.first, crds.second}];
			mp1[curB1].erase(vl);
			if (!used[i]) {
				used[i] = 1;
				q.push(i);
			}
		}

		mnX = x - d;
		curB = mnX - y;
		curB1 = ch[curB];
		while (mp2[curB1].lower_bound(mnX) != mp2[curB1].end() && (*(mp2[curB1].lower_bound(mnX)) <= x)) {
			ll vl = *(mp2[curB1].lower_bound(mnX));
			pair<ll, ll> crds = { vl, -(curB - vl) };
			ll i = ind[{crds.first, crds.second}];
			cnt++;
			mp2[curB1].erase(vl);
			if (!used[i]) {
				used[i] = 1;
				q.push(i);
			}
		}

		mxX = x + d;
		curB = (mxX - y);
		curB1 = ch[curB];
		while (mp2[curB1].lower_bound(x) != mp2[curB1].end() && (*(mp2[curB1].lower_bound(x)) <= mxX)) {
			ll vl = *(mp2[curB1].lower_bound(x));
			pair<ll, ll> crds = { vl, -(curB - vl) };
			ll i = ind[{crds.first, crds.second}];
			cnt++;
			mp2[curB1].erase(vl);
			if (!used[i]) {
				used[i] = 1;
				q.push(i);
			}
		}
	}
	
	for (int i = 0; i < SZ * 3; i++) {
		sort(mp_s1[i].begin(), mp_s1[i].end());
	}
	for (int i = 0; i < SZ * 3; i++) {
		sort(mp_s2[i].begin(), mp_s2[i].end());
	}
	ll ans = 0;
	for (int i = 0; i < n; i++) {
		if (used[i]) {
			ll addNw = ans;
			ll x = vec[i].first, y = vec[i].second;
			ll mnX = x - d;
			ll curB = ch[(mnX + y)];

			ans += (upper_bound(mp_s1[curB].begin(), mp_s1[curB].end(), x) - lower_bound(mp_s1[curB].begin(), mp_s1[curB].end(), mnX));

			ll mxX = x + d;
			curB = ch[(mxX + y)];
			ans += upper_bound(mp_s1[curB].begin(), mp_s1[curB].end(), mxX) - lower_bound(mp_s1[curB].begin(), mp_s1[curB].end(), x);

			mnX = x - d;
			curB = ch[mnX - y];
			ans += upper_bound(mp_s2[curB].begin(), mp_s2[curB].end(), x) - lower_bound(mp_s2[curB].begin(), mp_s2[curB].end(), mnX);

			mxX = x + d;
			curB = ch[(mxX - y)];
			ans += upper_bound(mp_s2[curB].begin(), mp_s2[curB].end(), mxX) - lower_bound(mp_s2[curB].begin(), mp_s2[curB].end(), x);
			addNw -= ans;
			addNw = abs(addNw);

			if (ind.find({ x - d, y }) != ind.end()) {
				ans--;
			}
			if (ind.find({ x + d, y }) != ind.end()) {
				ans--;
			}
			if (ind.find({ x, y - d }) != ind.end()) {
				ans--;
			}
			if (ind.find({ x, y + d }) != ind.end()) {
				ans--;
			}
		}
	}

	cout << ans / 2;

	return 0;
}



Measured memory_bytes: 138296