#include<functional>
#include<algorithm>
#include<iterator>
#include<cstring>
#include<cstdio>
#include<set>
#include<map>
using namespace std;
struct pii
{
	long long x,y;
	pii(){}
	pii(long long xx,long long yy){x=xx;y=yy;}
	inline bool operator<(const pii&b)const{return x<b.x?1:x>b.x?0:y<b.y;}
}o[111111];
class xp
{
	public:
		bool operator()(const pii&a,const pii&b)const{return a.x<b.x;}
}XP;
class yp
{
	public:
		bool operator()(const pii&a,const pii&b)const{return a.y<b.y;}
}YP;
int x[111111],y[111111];
set<long long>h[111111],v[111111];
map<pii,int>r;
long long kx[111111],ky[111111];
int n;
long long getpos(long long*begin,long long*end,long long x)
{
	long long*z=lower_bound(begin,end,x);
	if(x==*z)return z-begin+1;
	return 0;
}
#define gmax(a,b) ((a)>(b)?(a):(b))
#define gabs(a) ((a)>0?(a):-(a))
int Loo(int x1,int y1,int x2,int y2){return gmax(gabs(x1-x2),gabs(y1-y2));}
int pts;
int px[111111],py[111111];
long long d;
typedef set<long long>::iterator cat;
void del(int x,int y)
{
	int xx=getpos(kx,kx+n,x);
	int yy=getpos(ky,ky+n,y);
	h[xx].erase(y);
	v[yy].erase(x);
	//printf("%d %d  %d %d\n",xx,y,yy,x);
}
void DFS(int x,int y)
{
	//printf("] %d %d\n",x,y);
	del(x,y);
	px[++pts]=x;
	py[pts]=y;
	int id;
	id=getpos(kx,kx+n,x-d);
	for(cat elle=h[id].lower_bound(y-d);*elle<=y+d;elle=h[id].lower_bound(y-d))
	{
		//printf("%d %d->%lld %lld\n",x,y,x-d,*elle);
		DFS(x-d,*elle);
	}
	id=getpos(kx,kx+n,x+d);
	for(cat elle=h[id].lower_bound(y-d);*elle<=y+d;elle=h[id].lower_bound(y-d))
	{
		//printf("%d %d->%lld %lld\n",x,y,x+d,*elle);
		DFS(x+d,*elle);
	}
	id=getpos(ky,ky+n,y-d);
	for(cat elle=v[id].lower_bound(x-d);*elle<=x+d;elle=v[id].lower_bound(x-d))
	{
		//printf("%d %d->%lld %lld\n",x,y,*elle,y-d);
		DFS(*elle,y-d);
	}
	id=getpos(ky,ky+n,y+d);
	for(cat elle=v[id].lower_bound(x-d);*elle<=x+d;elle=v[id].lower_bound(x-d))
	{
		//printf("%d %d->%lld %lld\n",x,y,*elle,y+d);
		DFS(*elle,y+d);
	}
}
int gx(long long x){return lower_bound(kx,kx+n,x)-kx+1;}
int gy(long long y){return lower_bound(ky,ky+n,y)-ky+1;}
int gux(long long x){return upper_bound(kx,kx+n,x)-kx;}
int guy(long long y){return upper_bound(ky,ky+n,y)-ky;}
int f[266666];
const int T=131072;
void A(int l){for(l+=T;l;l>>=1)++f[l];}
void D(int l){for(l+=T;l;l>>=1)--f[l];}
int Q(int l,int r){int d=0;for(l+=T-1,r+=T+1;l^r^1;l>>=1,r>>=1)l&1?:d+=f[l^1],~r&1?:d+=f[r^1];return d;}
int main()
{
	int a,b;
	scanf("%d%d%d",&n,&a,&b);
	--a;--b;
	for(int i=0;i<=n;++i)
	{
		h[i].insert(1e17);
		v[i].insert(1e17);
	}
	for(int i=0;i<n;++i)
	{
		int xx,yy;
		scanf("%d%d",&xx,&yy);
		x[i]=xx+yy;
		y[i]=xx-yy;
		kx[i]=x[i];
		ky[i]=y[i];
		o[i]=pii(x[i],y[i]);
	}
	//puts("---");
	//for(int i=0;i<n;++i)printf("%d %d\n",x[i],y[i]);
	//puts("---");
	d=Loo(x[a],y[a],x[b],y[b]);

	kx[n]=2147483647;
	ky[n]=2147483647;
	sort(kx,kx+n);
	sort(ky,ky+n);
	
	o[n]=pii(2147483647,2147483647);
	sort(o,o+n,XP);
	for(int i=0;i<n;++i)
	{
		int x=o[i].x;
		int y=o[i].y;
		if(!i||o[i].x!=o[i-1].x)
		{
			pii*z=lower_bound(o,o+n,pii(x-d,0),XP);
			for(;z->x==x-d;++z)
				A(gy(z->y));
			z=lower_bound(o,o+n,pii(x+d,0),XP);
			for(;z->x==x+d;++z)
				A(gy(z->y));
		}
		r[pii(x,y)]+=Q(gy(y-d),guy(y+d));
		//printf("> %d %d %d\n",x,y,r[pii(x,y)]);
		if(o[i].x!=o[i+1].x)
		{
			pii*z=lower_bound(o,o+n,pii(x-d,0),XP);
			for(;z->x==x-d;++z)
				D(gy(z->y));
			z=lower_bound(o,o+n,pii(x+d,0),XP);
			for(;z->x==x+d;++z)
				D(gy(z->y));
		}
	}
	//puts("");
	sort(o,o+n,YP);
	for(int i=0;i<n;++i)
	{
		int x=o[i].x;
		int y=o[i].y;
		if(!i||o[i].y!=o[i-1].y)
		{
			pii*z=lower_bound(o,o+n,pii(0,y-d),YP);
			for(;z->y==y-d;++z)
				A(gx(z->x));
			z=lower_bound(o,o+n,pii(0,y+d),YP);
			for(;z->y==y+d;++z)
				A(gx(z->x));
		}
		r[pii(x,y)]+=Q(gx(x-d+1),gux(x+d-1));
		//printf("> %d %d %d\n",x,y,r[pii(x,y)]);
		if(o[i].y!=o[i+1].y)
		{
			pii*z=lower_bound(o,o+n,pii(0,y-d),YP);
			for(;z->y==y-d;++z)
				D(gx(z->x));
			z=lower_bound(o,o+n,pii(0,y+d),YP);
			for(;z->y==y+d;++z)
				D(gx(z->x));
		}
	}
	
	for(int i=0;i<n;++i)
	{
		h[getpos(kx,kx+n,x[i])].insert(y[i]);
		v[getpos(ky,ky+n,y[i])].insert(x[i]);
	}
	DFS(x[a],y[a]);
	long long res=0;
	for(int i=1;i<=pts;++i)
		res+=r[pii(px[i],py[i])];
	printf("%lld",res/2);
	return 0;
}

Measured memory_bytes: 47616