#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
using namespace std;
#define fi first
#define se second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;

const int maxn = 1e5+5;

int n, a, b;

int x[maxn], y[maxn];
bool vis[maxn];

set< ii > pos[maxn];
set< ii > neg[maxn];

vector<int> allp, alln;

vector<int> dp[maxn];
vector<int> dn[maxn];
vector<int> fp[maxn];
vector<int> fn[maxn];

void prep(vector<int> &v)
{
	sort(v.begin(), v.end());
	v.erase(unique(v.begin(), v.end()), v.end());
}

int ask(vector<int> &vec, int x)
{
	int pos = lower_bound(vec.begin(), vec.end(), x)-vec.begin();
	if(vec[pos] != x) return -1;
	return pos+1;
}

int sum(vector<int> &ft, int x)
{
	int res = 0;
	for(; x; x-= x&(-x)) res += ft[x];
	return res;
}

void update(vector<int> &ft, int x)
{
	for(; x< (int) ft.size(); x += x&(-x)) ft[x]++;
}

int main()
{
	scanf("%d %d %d", &n, &a, &b);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d %d", &x[i], &y[i]);
		allp.pb(x[i]+y[i]);
		alln.pb(x[i]-y[i]);
	}
	int dx = abs(x[a]-x[b]) + abs(y[a]-y[b]);
	prep(allp); prep(alln);
	for(int i = 1; i<= n; i++)
	{
		if(i == a || i == b) continue;
		int pp = ask(allp, x[i]+y[i]);
		pos[pp].insert(ii(x[i], i));
		int nn = ask(alln, x[i]-y[i]);
		neg[nn].insert(ii(x[i], i));
	}
	queue<int> q;
	q.push(a); q.push(b);
	vis[a] = vis[b] = true;
	while(!q.empty())
	{
		int u = q.front(); q.pop();
		int xx = x[u], yy = y[u];
		int pp = xx+yy, nn = xx-yy;
		int tar, bck;

		tar = pp-dx;
		bck = ask(allp, tar);
		if(bck != -1)
		{
			auto st = pos[bck].lower_bound({xx-dx, -1});
			auto it = st;
			while(it != pos[bck].end() && it->fi <= xx)
			{
				if(!vis[it->se])
				{
					vis[it->se] = true;
					q.push(it->se);
				}
				it++;
			}
			pos[bck].erase(st, it);
		}

		tar = pp+dx;
		bck = ask(allp, tar);
		if(bck != -1)
		{
			auto st = pos[bck].lower_bound({xx, -1});
			auto it = st;
			while(it != pos[bck].end() && it->fi <= xx+dx)
			{
				if(!vis[it->se])
				{
					vis[it->se] = true;
					q.push(it->se);
				}
				it++;
			}
			pos[bck].erase(st, it);
		}

		tar = nn-dx;
		bck = ask(alln, tar);
		if(bck != -1)
		{
			auto st = neg[bck].lower_bound({xx-dx, -1});
			auto it = st;
			while(it != neg[bck].end() && it->fi <= xx)
			{
				if(!vis[it->se])
				{
					vis[it->se] = true;
					q.push(it->se);
				}
				it++;
			}
			neg[bck].erase(st, it);
		}

		tar = nn+dx;
		bck = ask(alln, tar);
		if(bck != -1)
		{
			auto st = neg[bck].lower_bound({xx, -1});
			auto it = st;
			while(it != neg[bck].end() && it->fi <= xx+dx)
			{
				if(!vis[it->se])
				{
					vis[it->se] = true;
					q.push(it->se);
				}
				it++;
			}
			neg[bck].erase(st, it);
		}
	}

	for(int i = 1; i<= n; i++)
	{
		if(!vis[i]) continue;
		int pp = ask(allp, x[i]+y[i]);
		int nn = ask(alln, x[i]-y[i]);
		dp[pp].pb(x[i]); dn[nn].pb(x[i]);
	}
	for(int i = 1; i<= (int) allp.size(); i++)
	{
		sort(dp[i].begin(), dp[i].end());
		// printf("x+y = %d\n", allp[i-1]);
		// printf("[ "); for(int x : dp[i]) printf("%d ", x);
		// printf("]\n");
		fp[i].assign(dp[i].size()+1, 0);
	}
	for(int i = 1; i<= (int) alln.size(); i++)
	{
		sort(dn[i].begin(), dn[i].end());
		// printf("x-y = %d\n", alln[i-1]);
		// printf("[ "); for(int x : dn[i]) printf("%d ", x);
		// printf("]\n");
		fn[i].assign(dn[i].size()+1, 0);
	}
	ll ans = 0;
	for(int i = 1; i<= n; i++)
	{
		if(!vis[i]) continue;
		int xx = x[i], yy = y[i];
		int pp = xx+yy, nn = xx-yy;
		int tar, bck;

		tar = pp-dx;
		bck = ask(allp, tar);
		if(bck != -1)
		{
			int go = upper_bound(dp[bck].begin(), dp[bck].end(), xx)-dp[bck].begin();
			ans += sum(fp[bck], go);
			go = upper_bound(dp[bck].begin(), dp[bck].end(), xx-dx)-dp[bck].begin();
			ans -= sum(fp[bck], go);
		}

		tar = pp+dx;
		bck = ask(allp, tar);
		if(bck != -1)
		{
			int go = upper_bound(dp[bck].begin(), dp[bck].end(), xx+dx-1)-dp[bck].begin();
			ans += sum(fp[bck], go);
			go = upper_bound(dp[bck].begin(), dp[bck].end(), xx-1)-dp[bck].begin();
			ans -= sum(fp[bck], go);
		}

		tar = nn-dx;
		bck = ask(alln, tar);
		if(bck != -1)
		{
			int go = upper_bound(dn[bck].begin(), dn[bck].end(), xx-1)-dn[bck].begin();
			ans += sum(fn[bck], go);
			go = upper_bound(dn[bck].begin(), dn[bck].end(), xx-dx-1)-dn[bck].begin();
			ans -= sum(fn[bck], go);
		}

		tar = nn+dx;
		bck = ask(alln, tar);
		if(bck != -1)
		{
			int go = upper_bound(dn[bck].begin(), dn[bck].end(), xx+dx)-dn[bck].begin();
			ans += sum(fn[bck], go);
			go = upper_bound(dn[bck].begin(), dn[bck].end(), xx)-dn[bck].begin();
			ans -= sum(fn[bck], go);
		}
		// printf("finished asking\n");
		bck = ask(allp, pp);
		int go = upper_bound(dp[bck].begin(), dp[bck].end(), xx)-dp[bck].begin();
		update(fp[bck], go);
		// printf("update go = %d\n", go);
		bck = ask(alln, nn);
		go = upper_bound(dn[bck].begin(), dn[bck].end(), xx)-dn[bck].begin();
		update(fn[bck], go);
		// printf("update go = %d\n", go);
		// printf("updated %d\n", i);
	}
	printf("%lld\n", ans);
}

Measured memory_bytes: 34292