#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
using namespace std;

typedef long long s64;

inline int getint()
{
	static char c;
	while ((c = getchar()) < '0' || c > '9');

	int res = c - '0';
	while ((c = getchar()) >= '0' && c <= '9')
		res = res * 10 + c - '0';
	return res;
}

const int MaxN = 100000;

int n, sv, tv;
int vx[MaxN + 1], vy[MaxN + 1];

int id[MaxN + 1];

int dist;

inline bool comparator(int u, int v)
{
	if (vx[u] != vx[v])
		return vx[u] < vx[v];
	return vy[u] < vy[v];
}

int link[MaxN + 1];

vector<int> adj[MaxN + 1];

inline void add(int u, int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}

inline bool check(int u, int v, int d)
{
	if (vx[u] != vx[v] + dist)
		return vx[u] < vx[v] + dist;
	return vy[u] < vy[v] + d;
}

inline void build_graph(int d)
{
	sort(id + 1, id + n + 1, comparator);

	int l = 1, r = 1, k = 1;
	for (int i = 1; i <= n; ++i)
	{
		while (l <= n && check(id[l], id[i], -d))
			++l;
		while (r <= n && check(id[r], id[i], d + 1))
			++r;

		link[id[i]] += r - l;

		if ((k = max(k, l)) != r)
		{
			add(id[i], id[k]);
			while (k + 1 < r)
				add(id[k], id[k + 1]), ++k;
		}
	}
}

s64 res = 0;

bool vis[MaxN + 1];

void dfs(int u)
{
	vis[u] = true;

	res += link[u];
	for (int v : adj[u])
		if (!vis[v])
			dfs(v);
}

int main()
{
	cin >> n >> sv >> tv;
	for (int i = 1; i <= n; ++i)
	{
		int x = getint(), y = getint();
		vx[i] = x + y;
		vy[i] = x - y;
	}

	for (int i = 1; i <= n; ++i)
		id[i] = i;

	dist = max(abs(vx[sv] - vx[tv]), abs(vy[sv] - vy[tv]));

	build_graph(dist);

	for (int i = 1; i <= n; ++i)
		swap(vx[i], vy[i]);

	build_graph(dist - 1);

	dfs(sv);

	cout << res << endl;

	return 0;
}