#include <set>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define N 100005
#define pii pair<int, int>
#define mp(a, b) make_pair(a, b)
#define inf 998244353
multiset<pii >s1[N], s2[N];
vector<int>v1[N], v2[N];
int que[N], now;
int n, p, q, dis, d1[N], d2[N], c1, c2;
struct point{int x, y, a, b;}A[N];
void del(int x)
{
	s1[A[x].a].erase(s1[A[x].a].find(mp(A[x].x, x)));
	s2[A[x].b].erase(s2[A[x].b].find(mp(A[x].x, x)));
}
int main()
{
	scanf("%d%d%d", &n, &p, &q);
	for (int i = 1; i <= n; i++)
	{
		scanf("%d%d", &A[i].x, &A[i].y);
		A[i].a = A[i].x + A[i].y;
		d1[i] = A[i].a;
		A[i].b = A[i].x - A[i].y;
		d2[i] = A[i].b;
	}
	dis = abs(A[p].x - A[q].x) + abs(A[p].y - A[q].y);
	sort(d1 + 1, d1 + n + 1);
	sort(d2 + 1, d2 + n + 1);
	c1 = unique(d1 + 1, d1 + n + 1) - d1 - 1;
	c2 = unique(d2 + 1, d2 + n + 1) - d2 - 1;
	for (int i = 1; i <= n; i++)
	{
		A[i].a = lower_bound(d1 + 1, d1 + c1 + 1, A[i].a) - d1;
		A[i].b = lower_bound(d2 + 1, d2 + c2 + 1, A[i].b) - d2;
		s1[A[i].a].insert(mp(A[i].x, i));
		s2[A[i].b].insert(mp(A[i].x, i));
	}
	que[1] = p, que[2] = q;
	del(p), del(q);
	now = 2;
	for (int i = 1; i <= now; i++)
	{
		int a;
		set<pii >::iterator it, ao;
		//左上
		a = A[que[i]].x - dis - A[que[i]].y;
		if (d2[lower_bound(d2 + 1, d2 + c2 + 1, a) - d2] == a)
		{
			a = lower_bound(d2 + 1, d2 + c2 + 1, a) - d2;
			it = s2[a].lower_bound(mp(A[que[i]].x - dis, -inf));
			for (; ; )
			{
				if (it == s2[a].end() || it -> first > A[que[i]].x)break;
				que[++now] = it -> second;
				ao = it, it++;
				del(ao -> second);
			}
		}
		//左下
		a = A[que[i]].x - dis + A[que[i]].y;
		if (d1[lower_bound(d1 + 1, d1 + c1 + 1, a) - d1] == a)
		{
			a = lower_bound(d1 + 1, d1 + c1 + 1, a) - d1;
			it = s1[a].lower_bound(mp(A[que[i]].x - dis, -inf));
			for (; ; )
			{
				if (it == s1[a].end() || it -> first > A[que[i]].x)break;
				que[++now] = it -> second;
				ao = it, it++;
				del(ao -> second);
			}
		}
		//右上
		a = A[que[i]].x + dis + A[que[i]].y;
		if (d1[lower_bound(d1 + 1, d1 + c1 + 1, a) - d1] == a)
		{
			a = lower_bound(d1 + 1, d1 + c1 + 1, a) - d1;
			it = s1[a].lower_bound(mp(A[que[i]].x, -inf));
			for (; ; )
			{
				if (it == s1[a].end() || it -> first > A[que[i]].x + dis)break;
				que[++now] = it -> second;
				ao = it, it++;
				del(ao -> second);
			}
		}
		//右下
		a = A[que[i]].x + dis - A[que[i]].y;
		if (d2[lower_bound(d2 + 1, d2 + c2 + 1, a) - d2] == a)
		{
			a = lower_bound(d2 + 1, d2 + c2 + 1, a) - d2;
			it = s2[a].lower_bound(mp(A[que[i]].x, -inf));
			for (; ; )
			{
				if (it == s2[a].end() || it -> first > A[que[i]].x + dis)break;
				que[++now] = it -> second;
				ao = it, it++;
				del(ao -> second);
			}
		}
	}
	for (int i = 1; i <= now; i++)
	{
		v1[A[que[i]].a].push_back(A[que[i]].x);
		v2[A[que[i]].b].push_back(A[que[i]].x);
	}
	for (int i = 1; i <= c1; i++)
		sort(v1[i].begin(), v1[i].end());
	for (int i = 1; i <= c2; i++)
		sort(v2[i].begin(), v2[i].end());
	long long ans = 0;
	for (int i = 1; i <= now; i++)
	{
		int a;
		//左上
		a = A[que[i]].x - dis - A[que[i]].y;
		if (d2[lower_bound(d2 + 1, d2 + c2 + 1, a) - d2] == a)
		{
			a = lower_bound(d2 + 1, d2 + c2 + 1, a) - d2;
			ans += upper_bound(v2[a].begin(), v2[a].end(), A[que[i]].x) - lower_bound(v2[a].begin(), v2[a].end(), A[que[i]].x - dis);
		}
		//左下
		a = A[que[i]].x - dis + A[que[i]].y;
		if (d1[lower_bound(d1 + 1, d1 + c1 + 1, a) - d1] == a)
		{
			a = lower_bound(d1 + 1, d1 + c1 + 1, a) - d1;
			ans += upper_bound(v1[a].begin(), v1[a].end(), A[que[i]].x) - upper_bound(v1[a].begin(), v1[a].end(), A[que[i]].x - dis);
		}
		//右上
		a = A[que[i]].x + dis + A[que[i]].y;
		if (d1[lower_bound(d1 + 1, d1 + c1 + 1, a) - d1] == a)
		{
			a = lower_bound(d1 + 1, d1 + c1 + 1, a) - d1;
			ans += upper_bound(v1[a].begin(), v1[a].end(), A[que[i]].x + dis) - upper_bound(v1[a].begin(), v1[a].end(), A[que[i]].x);
		}
		//右下
		a = A[que[i]].x + dis - A[que[i]].y;
		if (d2[lower_bound(d2 + 1, d2 + c2 + 1, a) - d2] == a)
		{
			a = lower_bound(d2 + 1, d2 + c2 + 1, a) - d2;
			ans += lower_bound(v2[a].begin(), v2[a].end(), A[que[i]].x + dis) - upper_bound(v2[a].begin(), v2[a].end(), A[que[i]].x);
		}
	}
	printf("%lld\n", ans / 2);
}


Measured memory_bytes: 26880