#include "bits/stdc++.h"

//region Template
#include "ext/pb_ds/assoc_container.hpp"
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

const int MOD = 1000000007;

using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_multiset;

#define finish(x) cout << x; exit(0);
#define fastIO cin.tie(0); cin.sync_with_stdio(false);

void setIn(string s) { freopen(s.c_str(), "r", stdin); }
void setOut(string s) { freopen(s.c_str(),"w",stdout); }

//const string USCAO_TAG = "mountains";
void usaco(const string& USACO_TAG) { setIn(USACO_TAG + ".in"); setOut(USACO_TAG + ".out"); }
void print() {}
template<typename T, typename... Args>
void print(T firstArg, Args... args) {
	#ifdef LOCAL
	cout << firstArg << "\t";
	print(args...);
	#endif
}
//endregion

/* Notes:
 * Farah </3
 */

const int MAXN = 1e5 + 6;
const int INF = 2e9;

pair<pair<int, int>, int> p[MAXN];
int n, a, b;

ll res = 0;

vector<int> adj[MAXN];

bool V[MAXN];
ll deg[MAXN];

void dfs(int x){

	if(V[x]) return;
	V[x] = 1;
	res += deg[x];
	for(auto y : adj[x]){
		dfs(y);
	}
}

int pre[MAXN];
void solve(int d, int D){
	sort(p, p + n);
	memset(pre, 0, sizeof pre);
	for(int i = 0; i < n; i++) {
		for(int A: {p[i].first.first - d, p[i].first.first + d}){
			auto xx = lower_bound(p, p + n, make_pair(make_pair(A, -INF), -1)) - p;
			auto yy = lower_bound(p, p + n, make_pair(make_pair(A + 1, -INF), -1)) - p - 1;
			if(p[xx].first.first != A) continue;
			auto ll = lower_bound(p + xx, p + yy + 1, make_pair(make_pair(A, p[i].first.second - D), -1)) - p;
			auto rr = lower_bound(p + xx, p + yy + 1, make_pair(make_pair(A, p[i].first.second + D + 1), -1)) - p - 1;
			if(rr < ll) rr = ll;
			if(p[ll].first.first != A || p[ll].first.second < p[i].first.second - D || p[rr].first.second > p[i].first.second + D) continue;
			deg[p[i].second] += rr - ll + 1;

			assert(abs(p[i].first.first - p[rr].first.first) == d);
			assert(abs(p[i].first.second - p[rr].first.second) <= D);
			assert(abs(p[i].first.first - p[ll].first.first) == d);
			assert(abs(p[i].first.second - p[ll].first.second) <= D);
			//cout << p[i].second << " " << rr - ll + 1 << endl;

			adj[p[i].second].push_back(p[ll].second);
			adj[p[ll].second].push_back(p[i].second);
			//adj[p[i].second].push_back(p[rr].second);
			//adj[p[rr].second].push_back(p[i].second);

			pre[ll]++;
			pre[rr]--;
		}
	}

	for(int i = 0; i < n - 1; i++){
		if(i != 0) pre[i] += pre[i - 1];
		if(pre[i] > 0){
			adj[p[i].second].push_back(p[i + 1].second);
			adj[p[i + 1].second].push_back(p[i].second);
		}
	}


}

int main() {
	#ifdef LOCAL
	setIn("in.txt");
	setOut("out.txt");
	#endif

	cin >> n >> a >> b;
	a--, b--;

	int d = -1;
	for(int i = 0; i < n; i++){
		int x, y;
		cin >> x >> y;

		p[i] = {{x - y, x + y}, i};

	}


	d = max(abs(p[a].first.first - p[b].first.first), abs(p[a].first.second - p[b].first.second));
	solve(d, d);

	for(int i = 0; i < n; i++){
		swap(p[i].first.second, p[i].first.first);
	}

	solve(d, d - 1);

	dfs(a);
	cout << res / 2;
}


Measured memory_bytes: 16896