/*
Hanit Banga
Problem: 
*/

#include <iostream>
#include <cstdlib>
#include <map>
#include <set>
#include <vector>

using namespace std;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false)
#define x first
#define y second

typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int N = 1e5 + 5;
const ll INF = 1e15;

pll p[N];
vector <pll> conn;
map <pll, bool> seen;
map <ll, set <pll> > sum, diff;
map <pll, int> sumPos, diffPos;
set <pll> points;

ll manhattanDist(int a, int b);
ll sumP(ll temp, set <pll>::iterator st, set <pll>::iterator en);
ll diffP(ll temp, set <pll>::iterator st, set <pll>::iterator en);

int main()
{
	int n, a, b;
	cin >> n >> a >> b;

	for (int i = 1; i <= n; ++i)
	{
		cin >> p[i].x >> p[i].y;
		points.insert(p[i]);
		seen[p[i]] = 0;

		if (i != a and i != b)
		{
			sum[p[i].x + p[i].y].insert(p[i]);
			diff[p[i].x - p[i].y].insert(p[i]);
		}
	}

	conn.pb(p[a]);
	conn.pb(p[b]);
	seen[p[a]] = seen[p[b]] = true;

	ll d = manhattanDist(a, b);

	for (unsigned int i = 0; i < conn.size(); ++i)
	{
		pii temp = conn[i];

		auto st = sum[temp.x + temp.y + d].lower_bound({temp.x, -INF}), en = sum[temp.x + temp.y + d].upper_bound({temp.x+d, INF});
		for (auto j = st; j != en; ++j)
		{
			if (!seen[*j])
			{
				conn.pb(*j);
				seen[*j] = true;
			}
		}
		sum[temp.x + temp.y + d].erase(st, en);

		st = sum[temp.x + temp.y - d].lower_bound({temp.x - d, -INF}), en = sum[temp.x + temp.y - d].upper_bound({temp.x, INF});
		for (auto j = st; j != en; ++j)
		{
			if (!seen[*j])
			{
				conn.pb(*j);
				seen[*j] = true;
			}
		}
		sum[temp.x + temp.y - d].erase(st, en);

		st = diff[temp.x - temp.y + d].lower_bound({temp.x, -INF}), en = diff[temp.x - temp.y + d].upper_bound({temp.x+d, INF});
		for (auto j = st; j != en; ++j)
		{
			if (!seen[*j])
			{
				conn.pb(*j);
				seen[*j] = true;
			}
		}
		diff[temp.x - temp.y + d].erase(st, en);

		st = diff[temp.x - temp.y - d].lower_bound({temp.x - d, -INF}), en = diff[temp.x - temp.y - d].upper_bound({temp.x, INF});
		for (auto j = st; j != en; ++j)
		{
			if (!seen[*j])
			{
				conn.pb(*j);
				seen[*j] = true;
			}
		}
		diff[temp.x - temp.y - d].erase(st, en);
	}

	sum.clear();
	diff.clear();

	for (auto i : conn)
	{
		sum[i.x + i.y].insert(i);
		diff[i.x - i.y].insert(i);
	}

	for (auto i : sum)
	{
		int ctr = 0;

		for (auto j : i.second)
		{
			sumPos[j] = ctr;
			++ctr;
		}
	}

	for (auto i : diff)
	{
		int ctr = 0;

		for (auto j : i.second)
		{
			diffPos[j] = ctr;
			++ctr;
		}
	}

	ll ans = 0;
	// cout << sum[12].size() << ' ' << sum[2].size() << ' ' << diff[10].size() << ' ' << diff[0].size() << endl;

	for (auto i : conn)
	{
		// cout << i.x << ' ' << i.y << ' ';
		// ll till = ans;
		ans += sumP(i.x + i.y + d, sum[i.x + i.y + d].upper_bound({i.x+d, INF}), sum[i.x + i.y + d].lower_bound({i.x, -INF}));
		// cout << ans - till << endl;
		ans += sumP(i.x + i.y - d, sum[i.x + i.y - d].upper_bound({i.x, INF}), sum[i.x + i.y - d].lower_bound({i.x-d, -INF}));
		// cout << ans - till << endl;
		ans += diffP(i.x - i.y + d, diff[i.x - i.y + d].upper_bound({i.x+d, INF}), diff[i.x - i.y + d].lower_bound({i.x, -INF}));
		// cout << ans - till << endl;
		ans += diffP(i.x - i.y - d, diff[i.x - i.y - d].upper_bound({i.x, INF}), diff[i.x - i.y - d].lower_bound({i.x-d, -INF}));
		// cout << ans - till << endl;

		if (points.find({i.x, i.y + d}) != points.end())
			--ans;

		if (points.find({i.x, i.y - d}) != points.end())
			--ans;

		if (points.find({i.x + d, i.y}) != points.end())
			--ans;

		if (points.find({i.x - d, i.y}) != points.end())
			--ans;

		// cout << ans - till << endl;
	}

	cout << ans/2;
}

ll manhattanDist(int a, int b)
{
	return abs(p[a].x - p[b].x) + abs(p[a].y - p[b].y);
}

ll sumP(ll temp, set <pll>::iterator en, set <pll>::iterator st)
{
	if (st == sum[temp].end() or en == sum[temp].begin())
		return 0;

	--en;

	return sumPos[*en] - sumPos[*st] + 1;
}

ll diffP(ll temp, set <pll>::iterator en, set <pll>::iterator st)
{
	if (st == diff[temp].end() or en == diff[temp].begin())
		return 0;

	--en;

	return diffPos[*en] - diffPos[*st] + 1;
}

Measured memory_bytes: 79728