/*
*/

#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <list>
#include <ctime>

#include <memory.h>
#include <assert.h>

#define y0 sdkfaslhagaklsldk

#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash
#define norm asdfasdgasdgsd
#define have adsgagshdshfhds

#define eps 1e-11
#define M_PI 3.141592653589793
#define bs 1000000007
#define bsize 337

using namespace std;

const int INF = 1e9;
const int N = 500031;

int n, a, b;
long long x[N], y[N];

int get_dist(int a, int b)
{
	return abs(x[a] - x[b]) + abs(y[a] - y[b]);
}

set<pair<long long, pair<long long, long long> > > byplus, byminus;
set<pair<long long, pair<long long, long long> > > ::iterator it;

int used[N];

long long cur_dist;

void dfs(int v)
{
	used[v] = 1;

	// up
	long long l_x = x[v] - cur_dist;
	long long l_y = y[v];
	long long r_x = x[v];
	long long r_y = y[v] + cur_dist;

	// lu
	if (0ll+l_x-l_y>=-2e9-1e7)
	while (true)
	{
		set<pair<long long, pair<long long, long long> > > ::iterator it;
		it = byminus.lower_bound(make_pair(l_x - l_y, make_pair(l_x, -1)));
		if (it == byminus.end())
			break;
		if ((*it).first != l_x - l_y)
			break;
		if ((*it).second.first > r_x)
			break;
		int id = ((*it).second.second);
		byminus.erase(it);
		byplus.erase(make_pair(x[id] + y[id], make_pair(x[id], id)));
		dfs(id);
	}
	// rd
	l_x = x[v];
	l_y = y[v] - cur_dist;
	r_x = x[v] + cur_dist;
	r_y = y[v];

	if (0ll+l_x-l_y>=-2e9-1e7)
	while (true)
	{
		set<pair<long long, pair<long long, long long> > > ::iterator it;
		it = byminus.lower_bound(make_pair(l_x - l_y, make_pair(l_x, -1)));
		if (it == byminus.end())
			break;
		if ((*it).first != l_x - l_y)
			break;
		if ((*it).second.first > r_x)
			break;
		int id = ((*it).second.second);
		byminus.erase(it);
		byplus.erase(make_pair(x[id] + y[id], make_pair(x[id], id)));
		dfs(id);
	}

	//ld
	l_x = x[v]-cur_dist;
	l_y = y[v];
	r_x = x[v];
	r_y = y[v] - cur_dist;
	if (0ll+l_x+l_y<=2e9+1e7)
	while (true)
	{
		set<pair<long long, pair<long long, long long> > > ::iterator it;
		it = byplus.lower_bound(make_pair(l_x + l_y, make_pair(l_x, -1)));
		if (it == byplus.end())
			break;
		if ((*it).first != l_x + l_y)
			break;
		if ((*it).second.first > r_x)
			break;
		int id = ((*it).second.second);
		byplus.erase(it);
		byminus.erase(make_pair(x[id] - y[id], make_pair(x[id], id)));
		dfs(id);
	}
	// ru
	l_x = x[v];
	l_y = y[v] + cur_dist;
	r_x = x[v] + cur_dist;
	r_y = y[v];
	if (0ll + l_x + l_y <= 2e9+1e8)
	while (true)
	{
		set<pair<long long, pair<long long, long long> > > ::iterator it;
		it = byplus.lower_bound(make_pair(l_x + l_y, make_pair(l_x, -1)));
		if (it == byplus.end())
			break;
		if ((*it).first != l_x + l_y)
			break;
		if ((*it).second.first > r_x)
			break;
		int id = ((*it).second.second);
		byplus.erase(it);
		byminus.erase(make_pair(x[id] - y[id], make_pair(x[id], id)));
		dfs(id);
	}
}

vector<pair<long long, long long> > plusorder, minusorder;

int count_nei(int v)
{
	int ret = 0;

	long long l_x = x[v] - cur_dist;
	long long l_y = y[v];
	long long r_x = x[v];
	long long r_y = y[v] + cur_dist;

	if (0ll+l_x-l_y>=-2e9-1e6)
		ret += lower_bound(minusorder.begin(), minusorder.end(), make_pair(l_x - l_y, r_x)) - lower_bound(minusorder.begin(), minusorder.end(), make_pair(l_x - l_y, l_x));


	l_x = x[v];
	l_y = y[v] - cur_dist;
	r_x = x[v] + cur_dist;
	r_y = y[v];
	if (0ll + l_x - l_y >= -2e9 - 1e6)
		ret += lower_bound(minusorder.begin(), minusorder.end(), make_pair(l_x - l_y, r_x)) - lower_bound(minusorder.begin(), minusorder.end(), make_pair(l_x - l_y, l_x));


	l_x = x[v] - cur_dist;
	l_y = y[v];
	r_x = x[v];
	r_y = y[v] - cur_dist;
	if (0ll+l_x+l_y<=2e9+1e7)
	ret += lower_bound(plusorder.begin(), plusorder.end(), make_pair(l_x + l_y, r_x)) - upper_bound(plusorder.begin(), plusorder.end(), make_pair(l_x + l_y, l_x));


	l_x = x[v];
	l_y = y[v] + cur_dist;
	r_x = x[v] + cur_dist;
	r_y = y[v];
	if (0ll + l_x + l_y <= 2e9 + 1e7)
	ret += upper_bound(plusorder.begin(), plusorder.end(), make_pair(l_x + l_y, r_x)) - lower_bound(plusorder.begin(), plusorder.end(), make_pair(l_x + l_y, l_x));

	return ret;
}

int main(){
	//freopen("tree.in","r",stdin);
	//freopen("tree.out","w",stdout);
	//	freopen("F:/input.txt", "r", stdin);
	//	freopen("F:/output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	//cin.tie(0);
	
	cin >> n;
	cin >> a >> b;

	for (int i = 1; i <= n; i++)
	{
		cin >> x[i] >> y[i];
	}

	cur_dist = get_dist(a, b);

	for (int i = 1; i <= n; i++)
	{
		byplus.insert(make_pair(x[i] + y[i], make_pair(x[i], i)));
		byminus.insert(make_pair(x[i] - y[i], make_pair(x[i], i)));
	}
	
	dfs(a);
	dfs(b);

	/*for (int i = 1; i <= n; i++){
		cout << used[i] << " ";
	}
	cout << endl;
	*/

	long long ans = 0;

	for (int i = 1; i <= n; i++)
	{
		if (used[i])
		plusorder.push_back(make_pair(x[i] + y[i], x[i])),
		minusorder.push_back(make_pair(x[i] - y[i], x[i]));
	}

	sort(plusorder.begin(), plusorder.end());
	sort(minusorder.begin(), minusorder.end());

	for (int i=1; i <= n; i++)
	{
		if (used[i] == 0)
			continue;
		ans += count_nei(i);
	}

	ans /= 2;
	plusorder.clear();
	minusorder.clear();

	for (int i = 1; i <= n; i++)
	{
		if (used[i])
			continue;

			plusorder.push_back(make_pair(x[i] + y[i], x[i])),
			minusorder.push_back(make_pair(x[i] - y[i], x[i]));
	}

	sort(plusorder.begin(), plusorder.end());
	sort(minusorder.begin(), minusorder.end());

	for (int i = 1; i <= n; i++)
	{
		if (used[i] == 0)
			continue;
		ans += count_nei(i);
	}

	cout << ans << endl;

	cin.get(); cin.get();
	return 0;
}

Measured memory_bytes: 25856