#include<bits/stdc++.h>
#define N 300005
#define ll long long
using namespace std;

int n,u,v,il,ir,x[N],y[N],ly,q[N],fl[N];ll Ans;
struct T
{
	int x,y,id;
};
bool operator<(T a,T b)
{
	return a.x==b.x?a.y==b.y?a.id<b.id:a.y<b.y:a.x<b.x;
}
set<T>s[N*2];
vector<T>h[N*2];
map<int,int>p,e;
void del(int i)
{
	fl[i]=1;
	q[++ir]=i;
	s[p[x[i]+y[i]]].erase((T){x[i],y[i],i});
	s[e[-x[i]+y[i]]].erase((T){x[i],y[i],i});
}
void mov(int k,int l,int r)
{
	set<T>::iterator i;
	i=s[k].upper_bound((T){l,0,0});
	while(i!=s[k].end()&&(*i)<(T){r+1,0,0})
	{
		del((*i).id);
		i=s[k].upper_bound((T){l,0,0});
	}
}
int sum(int k,int l,int r)
{
	if (!k) return 0;
	return lower_bound(h[k].begin(),h[k].end(),(T){r+1,0,0})-upper_bound(h[k].begin(),h[k].end(),(T){l,0,0});
}
int main()
{
	scanf("%d%d%d",&n,&u,&v);
	for (int i=1;i<=n;i++)
	{
		scanf("%d%d",&x[i],&y[i]);
		if (!p[x[i]+y[i]])p[x[i]+y[i]]=++ly;
		s[p[x[i]+y[i]]].insert((T){x[i],y[i],i});
		if (!e[-x[i]+y[i]])e[-x[i]+y[i]]=++ly;
		s[e[-x[i]+y[i]]].insert((T){x[i],y[i],i});
	}
	il=0;ir=0;
	//q[1]=u;q[2]=v;
	int len=abs(x[u]-x[v])+abs(y[u]-y[v]);
	del(u);del(v);
	while(il<ir)
	{
		il++;
		int tmp=q[il];

		mov(p[x[tmp]+y[tmp]+len],x[tmp],x[tmp]+len);
		mov(p[x[tmp]+y[tmp]-len],x[tmp]-len,x[tmp]);
		mov(e[-x[tmp]+y[tmp]+len],x[tmp]-len,x[tmp]);
		mov(e[-x[tmp]+y[tmp]-len],x[tmp],x[tmp]+len);
	}
	for (int i=1;i<=n;i++)
		if (fl[i])
		{
			h[p[x[i]+y[i]]].push_back((T){x[i],y[i],i});
			h[e[-x[i]+y[i]]].push_back((T){x[i],y[i],i});
		}
	for (int i=1;i<=ly;i++)
		sort(h[i].begin(),h[i].end());
	for (int i=1;i<=n;i++)
	if (fl[i])
	{
		Ans+=sum(p[x[i]+y[i]+len],x[i],x[i]+len-1);
		Ans+=sum(p[x[i]+y[i]-len],x[i]-len,x[i]-1);
		Ans+=sum(e[-x[i]+y[i]+len],x[i]-len+1,x[i]-1);
		Ans+=sum(e[-x[i]+y[i]-len],x[i],x[i]+len);
		//cout<<i<<' '<<Ans<<endl;
	}
	printf("%lld\n",Ans/2);
}
