#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"

using namespace std;

const long long int MOD = 1000000007;
//const int MOD = 998244353;

//long long int N, M, K, H, W, L, R;
int N, M, K, H, W, L, R;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N >> L >> R;
	L--;
	R--;
	vector<pair<int, int>>v(N);
	set<pair<int, int>>xys;
	set<pair<int, int>>yxs;
	for (auto &i : v) {
		cin >> i.first >> i.second;
		i = { i.first - i.second,i.first + i.second };
		xys.insert(i);
		yxs.insert({ i.second,i.first });
	}
	queue<pair<int, int>>Q;
	Q.push(v[L]);
	Q.push(v[R]);
	K = max(abs(v[L].first - v[R].first), abs(v[L].second - v[R].second));
	xys.erase(v[L]);
	xys.erase(v[R]);
	yxs.erase({ v[L].second,v[L].first });
	yxs.erase({ v[R].second,v[R].first });
	set<pair<int, int>>usedxys;
	set<pair<int, int>>usedyxs;
	while (!Q.empty()) {
		auto cn = Q.front();
		usedxys.insert(cn);
		usedyxs.insert({ cn.second,cn.first });
		Q.pop();
		auto it = xys.lower_bound({ cn.first + K,cn.second - K });
		while (it != xys.end() && it->first == cn.first + K && it->second <= cn.second + K) {
			yxs.erase({ it->second,it->first });
			Q.push(*it);
			xys.erase(it);
			it = xys.lower_bound({ cn.first + K,cn.second - K });
		}
		it = xys.lower_bound({ cn.first - K,cn.second - K });
		while (it != xys.end() && it->first == cn.first - K && it->second <= cn.second + K) {
			yxs.erase({ it->second,it->first });
			Q.push(*it);
			xys.erase(it);
			it = xys.lower_bound({ cn.first - K,cn.second - K });
		}
		it = yxs.lower_bound({ cn.second + K,cn.first - K });
		while (it != yxs.end() && it->first == cn.second + K && it->second <= cn.first + K) {
			xys.erase({ it->second,it->first });
			Q.push({ it->second,it->first });
			yxs.erase(it);
			it = yxs.lower_bound({ cn.second + K,cn.first - K });
		}
		it = yxs.lower_bound({ cn.second - K,cn.first - K });
		while (it != yxs.end() && it->first == cn.second - K && it->second <= cn.first + K) {
			xys.erase({ it->second,it->first });
			Q.push({ it->second,it->first });
			yxs.erase(it);
			it = yxs.lower_bound({ cn.second - K,cn.first - K });
		}
	}
	long long int ans = 0;
	vector<pair<int, int>>uxys;
	vector<pair<int, int>>uyxs;
	for (auto i : usedxys)uxys.push_back(i);
	for (auto i : usedyxs)uyxs.push_back(i);
	for (auto i : uxys) {
		cerr << i.first << " " << i.second << endl;
		ans += distance(lower_bound(uxys.begin(), uxys.end(), make_pair(i.first + K, i.second - K)), upper_bound(uxys.begin(), uxys.end(), make_pair(i.first + K, i.second + K)));
		cerr << ans << " ";
		ans += distance(lower_bound(uxys.begin(), uxys.end(), make_pair(i.first - K, i.second - K)), upper_bound(uxys.begin(), uxys.end(), make_pair(i.first - K, i.second + K)));
		cerr << ans << " ";
		ans += distance(upper_bound(uyxs.begin(), uyxs.end(), make_pair(i.second + K, i.first - K)), lower_bound(uyxs.begin(), uyxs.end(), make_pair(i.second + K, i.first + K)));
		cerr << ans << " ";
		ans += distance(upper_bound(uyxs.begin(), uyxs.end(), make_pair(i.second - K, i.first - K)), lower_bound(uyxs.begin(), uyxs.end(), make_pair(i.second - K, i.first + K)));
		cerr << ans << endl;
	}
	cout << ans / 2 << endl;
	return 0;
}

Measured memory_bytes: 15092