#include <bits/stdc++.h>
#define x first
#define y second
#define mp(x,y) make_pair((x),(y))
#define ab(x) ((x)>0?(x):-(x))
#define all(x) ((x).begin(),(x).end())
#define L long long 
#define y1 asdfasdfkjhhfh

using namespace std;

L n,s,e,x[100010],y[100010],ans,dist;
L chk[100010];
map<L,set<pair<L,pair<L,L> > > >hor1,hor2,vir1,vir2;
queue<L>Q;

L count1(L x,L y1,L y2){
	L ret=0;
	map<L,set<pair<L,pair<L,L> > > >::iterator it1=vir1.find(x);
	map<L,set<pair<L,pair<L,L> > > >::iterator it2=vir2.find(x);
	if(it2==vir2.end()) return ret;
	set<pair<L,pair<L,L> > >::iterator itt1=it2->y.lower_bound(mp(y1,mp(0,0)));
	set<pair<L,pair<L,L> > >::iterator itt2=it2->y.lower_bound(mp(y2,mp(0,0)));

	if(itt2==it2->y.end()) ret+=it2->y.size();
	else ret+=itt2->y.y;
	if(itt1==it2->y.end()) ret-=it2->y.size();
	else ret-=itt1->y.y;
	
	for(set<pair<L,pair<L,L> > >::iterator itt3=it1->y.lower_bound(mp(y1,mp(0,0)));itt3!=it1->y.end();)
	{
		if(itt3->x<y2)
		{
			if(!chk[itt3->y.x])
			{
				chk[itt3->y.x]=1;
				Q.push(itt3->y.x);
			}
			it1->y.erase(itt3);
			itt3=it1->y.lower_bound(mp(y1,mp(0,0)));
		}
		else break;
	}
	//printf("c1 ret %lld\n",ret);
	return ret;
}
L count2(L y,L x1,L x2){
	L ret=0;
	map<L,set<pair<L,pair<L,L> > > >::iterator it1=hor1.find(y);
	map<L,set<pair<L,pair<L,L> > > >::iterator it2=hor2.find(y);
	if(it2==hor2.end()) return ret;
	set<pair<L,pair<L,L> > >::iterator itt1=it2->y.lower_bound(mp(x1,mp(0,0)));
	set<pair<L,pair<L,L> > >::iterator itt2=it2->y.lower_bound(mp(x2,mp(0,0)));

	if(itt2==it2->y.end()) ret+=it2->y.size();
	else ret+=itt2->y.y;
	if(itt1==it2->y.end()) ret-=it2->y.size();
	else ret-=itt1->y.y;

	for(set<pair<L,pair<L,L> > >::iterator itt3=it1->y.lower_bound(mp(x1,mp(0,0)));itt3!=it1->y.end();)
	{
		if(itt3->x<x2)
		{
			if(!chk[itt3->y.x])
			{
				chk[itt3->y.x]=1;
				Q.push(itt3->y.x);
			}
			it1->y.erase(itt3);
			itt3=it1->y.lower_bound(mp(x1,mp(0,0)));
		}
		else break;
	}
	//printf("c2 ret %lld\n",ret);
	return ret;
}

L number_of_shots(int N, int A, int B, vector<int>xs, vector<int>ys){
	n=N;
	s=A;
	e=B;
	L i;
	//puts("x, y");
	for(i=0;i<N;i++)
	{
		x[i]=xs[i]+ys[i];
		y[i]=xs[i]-ys[i];
		vir1[x[i]].insert(mp(y[i],mp(i,0)));
		hor1[y[i]].insert(mp(x[i],mp(i,0)));
		//printf("%lld %lld\n",x[i],y[i]);
	}
	for(map<L,set<pair<L,pair<L,L> > > >::iterator it=vir1.begin();it!=vir1.end();it++)
	{
		L cnt=0;
		for(set<pair<L,pair<L,L> > >::iterator jt=it->y.begin();jt!=it->y.end();jt++,cnt++)
			vir2[it->x].insert(mp(jt->x,mp(jt->y.x,cnt)));
	}
	for(map<L,set<pair<L,pair<L,L> > > >::iterator it=hor1.begin();it!=hor1.end();it++)
	{
		L cnt=0;
		for(set<pair<L,pair<L,L> > >::iterator jt=it->y.begin();jt!=it->y.end();jt++,cnt++)
			hor2[it->x].insert(mp(jt->x,mp(jt->y.x,cnt)));
	}
	dist=max(ab(x[s]-x[e]),ab(y[s]-y[e]));
	//printf("dist %lld\n",dist);
	chk[s]=1;
	Q.push(s);
	while(!Q.empty())
	{
		L X=Q.front();Q.pop();
		//printf("X %lld\n",X);
		ans += count1(x[X]+dist,y[X]-dist,y[X]+dist+1);//[]
		ans += count1(x[X]-dist,y[X]-dist,y[X]+dist+1);//[]
		ans += count2(y[X]+dist,x[X]-dist+1,x[X]+dist);//()
		ans += count2(y[X]-dist,x[X]-dist+1,x[X]+dist);//()
	}
	//printf("ret %lld\n",ans);
	return ans/2;
}
//#include "pilot2.h"

#include <cstdlib>
#include <vector>
#include <iostream>

static void iassert(int x) {
	if (x) return;
	printf("Wrong Answer!\n");
	exit(0);
}

int main() {
	//freopen("output.txt","w",stdout);
	int N, a, b;
	iassert(!!(std::cin >> N >> a >> b));
	std::vector<int> x(N), y(N);
	for (int i = 0; i < N; ++i) {
		iassert(!!(std::cin >> x[i] >> y[i]));
	}
	long long ret = number_of_shots(N, a-1, b-1, x, y);

	std::cout << ret << '\n';
	return 0;
}

Measured memory_bytes: 61568