#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#define mp(i, j) make_pair(i, j)
#define pii pair<int, int> 
#define fir first
#define sec second
const int N = 2e5 + 5;
typedef long long ll; 
using namespace std;

int d, top, stk[N], S, T, vis[N], cx[N], cy[N], cnt1, cnt2, n;
struct node { int x, y, nx, ny; } p[N]; 
ll ans; 
vector<int> vecx[N], vecy[N]; 
set<pii > sx[N], sy[N]; 
set<pii > :: iterator it;
queue<int> q; 

template < typename T >
inline T read()
{
	T x = 0, w = 1; char c = getchar();
	while(c < '0' || c > '9') { if(c == '-') w = -1; c = getchar(); }
	while(c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
	return x * w; 
}

void addy(int id, int val)
{
	int x, y;
	x = lower_bound(vecx[id].begin(), vecx[id].end(), val - d) - vecx[id].begin();
	y = upper_bound(vecx[id].begin(), vecx[id].end(), val + d) - vecx[id].begin();
	return (void) (ans += y - x); 
}

void addx(int id, int val)
{
	int x, y;
	x = upper_bound(vecy[id].begin(), vecy[id].end(), val - d) - vecy[id].begin(); 
	y = lower_bound(vecy[id].begin(), vecy[id].end(), val + d) - vecy[id].begin(); 
	return (void) (ans += y - x); 
}

void solvex(int id, int val)
{
	it = sx[id].lower_bound(mp(val - d, 0)), top = 0;
	for( ; it != sx[id].end() && (*it).fir <= val + d; it++) stk[++top] = (*it).sec;
	for(int v, i = 1; i <= top; i++)
		v = stk[i], q.push(v), sx[p[v].nx].erase(mp(p[v].y, v)), sy[p[v].ny].erase(mp(p[v].x, v)); 
}

void solvey(int id, int val)
{
	it = sy[id].lower_bound(mp(val - d, 0)), top = 0;
	for( ; it != sy[id].end() && (*it).fir <= val + d; it++) stk[++top] = (*it).sec;
	for(int v, i = 1; i <= top; i++)
		v = stk[i], q.push(v), sx[p[v].nx].erase(mp(p[v].y, v)), sy[p[v].ny].erase(mp(p[v].x, v)); 
}

void BFS()
{
	q.push(S); int x, y; 
	while(!q.empty())
	{
		int u = q.front(); q.pop(); vis[u] = 1;
		x = lower_bound(cx + 1, cx + cnt1 + 1, p[u].x - d) - cx; 
		if(x <= cnt1 && cx[x] == p[u].x - d) solvex(x, p[u].y); 
		x = lower_bound(cx + 1, cx + cnt1 + 1, p[u].x + d) - cx; 
		if(x <= cnt1 && cx[x] == p[u].x + d) solvex(x, p[u].y); 
		y = lower_bound(cy + 1, cy + cnt2 + 1, p[u].y - d) - cy; 
		if(y <= cnt2 && cy[y] == p[u].y - d) solvey(y, p[u].x); 
		y = lower_bound(cy + 1, cy + cnt2 + 1, p[u].y + d) - cy; 
		if(y <= cnt2 && cy[y] == p[u].y + d) solvey(y, p[u].x); 
	}
}

int mabs(int x) { return x < 0 ? -x : x; }

int main()
{
#ifndef ONLINE_JUDGE
	freopen("cpp.in", "r", stdin);
#endif
	n = read <int> (), S = read <int> (), T = read <int> ();
	for(int x, y, i = 1; i <= n; i++)
	{
		x = read <int> (), y = read <int> (), p[i].x = x + y, p[i].y = x - y;
		cx[++cnt1] = p[i].x, cy[++cnt2] = p[i].y; 
	}
	d = max(mabs(p[S].x - p[T].x), mabs(p[S].y - p[T].y)); 
	sort(cx + 1, cx + cnt1 + 1), cnt1 = unique(cx + 1, cx + cnt1 + 1) - cx - 1;
	sort(cy + 1, cy + cnt2 + 1), cnt2 = unique(cy + 1, cy + cnt2 + 1) - cy - 1;
	for(int i = 1; i <= n; i++)
	{
		p[i].nx = lower_bound(cx + 1, cx + cnt1 + 1, p[i].x) - cx; 
		p[i].ny = lower_bound(cy + 1, cy + cnt2 + 1, p[i].y) - cy; 
		vecx[p[i].nx].push_back(p[i].y), vecy[p[i].ny].push_back(p[i].x);
		sx[p[i].nx].insert(mp(p[i].y, i)), sy[p[i].ny].insert(mp(p[i].x, i)); 
	}
	for(int i = 1; i <= cnt1; i++) sort(vecx[i].begin(), vecx[i].end());
	for(int i = 1; i <= cnt2; i++) sort(vecy[i].begin(), vecy[i].end()); 
	BFS(); 
	for(int pos, i = 1; i <= n; i++)
		if(vis[i])
		{
			pos = lower_bound(cx + 1, cx + cnt1 + 1, p[i].x - d) - cx;
			if(pos <= cnt1 && cx[pos] == p[i].x - d) addy(pos, p[i].y); 
			pos = lower_bound(cx + 1, cx + cnt1 + 1, p[i].x + d) - cx; 
			if(pos <= cnt1 && cx[pos] == p[i].x + d) addy(pos, p[i].y);
			pos = lower_bound(cy + 1, cy + cnt2 + 1, p[i].y - d) - cy;
			if(pos <= cnt2 && cy[pos] == p[i].y - d) addx(pos, p[i].x);
			pos = lower_bound(cy + 1, cy + cnt2 + 1, p[i].y + d) - cy;
			if(pos <= cnt2 && cy[pos] == p[i].y + d) addx(pos, p[i].x); 
		}
	printf("%lld\n", ans / 2); 
	return 0; 
}


Measured memory_bytes: 39316