#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<set>
#include<map>
#define sqr(x) (x)*(x)
#define btoe(v) v.begin(),v.end()
using namespace std;
long long n,m,a,b,i,j,dax[100005],day[100005],used[100005],ans,x,y,dis,cntx,cnty,itr[100005],itc[100005];
set<pair<long long,int>/**/> r1[100005],c1[100005];
vector<long long> r2[100005],c2[100005];
//vector<long long> lsx,lsy;
map<long long,long long> mpr,mpc;
void dfs(int x)
{
	if (used[x]) return;
	//cerr<<x<<":"<<endl;
	used[x]=1;
	r1[dax[x]].erase(make_pair(itc[day[x]],x));
	c1[day[x]].erase(make_pair(itr[dax[x]],x));
	long long xx=dax[x],yy=day[x];
	int i;
	set<pair<long long,int>/**/>::iterator lb;
	set<pair<long long,int>/**/>::iterator ub;
	vector<long long>::iterator vlb;
	vector<long long>::iterator vub;
	if (mpr.count(itr[xx]+dis))
	{
		lb=r1[mpr[itr[xx]+dis]].lower_bound(make_pair(itc[yy]-dis,0));
		ub=r1[mpr[itr[xx]+dis]].upper_bound(make_pair(itc[yy]+dis,1e8));
		for (set<pair<long long,int>/**/>::iterator it=lb;it->first<=itc[yy]+dis;it=r1[mpr[itr[xx]+dis]].lower_bound(make_pair(itc[yy]-dis,0))) 
		{
			if (it->second&&(it->first<=itc[yy]+dis))
			{
				//cerr<<it->second<<endl;
				dfs(it->second);
			}
			else break;
		}
		vlb=lower_bound(btoe(r2[mpr[itr[xx]+dis]]),itc[yy]-dis);
		vub=upper_bound(btoe(r2[mpr[itr[xx]+dis]]),itc[yy]+dis-1);
		ans+=vub-vlb;
		/*for (vector<long long>::iterator it=vlb;it!=vub;it++)
		{
			//cerr<<itr[xx]<<' '<<itc[yy]<<' '<<itr[xx]+dis<<' '<<*it<<endl;
		}*/
	}
	if (mpr.count(itr[xx]-dis))
	{
		lb=r1[mpr[itr[xx]-dis]].lower_bound(make_pair(itc[yy]-dis,0));
		ub=r1[mpr[itr[xx]-dis]].upper_bound(make_pair(itc[yy]+dis,1e8));
		for (set<pair<long long,int>/**/>::iterator it=lb;it->first<=itc[yy]+dis;it=r1[mpr[itr[xx]-dis]].lower_bound(make_pair(itc[yy]-dis,0))) 
		{
			if (it->second&&(it->first<=itc[yy]+dis))
			{
				//cerr<<it->second<<endl;
				dfs(it->second);
			}
			else break;
		}
		vlb=lower_bound(btoe(r2[mpr[itr[xx]-dis]]),itc[yy]-dis+1);
		vub=upper_bound(btoe(r2[mpr[itr[xx]-dis]]),itc[yy]+dis);
		ans+=vub-vlb;
		/*for (vector<long long>::iterator it=vlb;it!=vub;it++)
		{
			//cerr<<itr[xx]<<' '<<itc[yy]<<' '<<itr[xx]-dis<<' '<<*it<<endl;
		}*/
	}
	if (mpc.count(itc[yy]-dis))
	{
		lb=c1[mpc[itc[yy]-dis]].lower_bound(make_pair(itr[xx]-dis,0));
		ub=c1[mpc[itc[yy]-dis]].upper_bound(make_pair(itr[xx]+dis,1e8));
		for (set<pair<long long,int>/**/>::iterator it=lb;it->first<=itr[xx]+dis;it=c1[mpc[itc[yy]-dis]].lower_bound(make_pair(itr[xx]-dis,0)))
		{
			if (it->second&&(it->first<=itr[xx]+dis))
			{
				//cerr<<it->second<<endl;
				dfs(it->second);
			}
			else break;
		}
		vlb=lower_bound(btoe(c2[mpc[itc[yy]-dis]]),itr[xx]-dis);
		vub=upper_bound(btoe(c2[mpc[itc[yy]-dis]]),itr[xx]+dis-1);
		ans+=vub-vlb;
		/*for (vector<long long>::iterator it=vlb;it!=vub;it++)
		{
			//cerr<<itr[xx]<<' '<<itc[yy]<<' '<<*it<<' '<<itc[yy]-dis<<endl;
		}*/
	}
	if (mpc.count(itc[yy]+dis))
	{
		lb=c1[mpc[itc[yy]+dis]].lower_bound(make_pair(itr[xx]-dis,0));
		ub=c1[mpc[itc[yy]+dis]].upper_bound(make_pair(itr[xx]+dis,1e8));
		for (set<pair<long long,int>/**/>::iterator it=lb;it->first<=itr[xx]+dis;it=c1[mpc[itc[yy]+dis]].lower_bound(make_pair(itr[xx]-dis,0))) 
		{
			if (it->second&&(it->first<=itr[xx]+dis))
			{
				//cerr<<it->second<<endl;
				dfs(it->second);
			}
			else break;
		}
		vlb=lower_bound(btoe(c2[mpc[itc[yy]+dis]]),itr[xx]-dis+1);
		vub=upper_bound(btoe(c2[mpc[itc[yy]+dis]]),itr[xx]+dis);
		ans+=vub-vlb;
		/*for (vector<long long>::iterator it=vlb;it!=vub;it++)
		{
			//cerr<<itr[xx]<<' '<<itc[yy]<<' '<<*it<<' '<<itc[yy]+dis<<endl;
		}*/
	}
}
int main()
{
	cin>>n>>a>>b;
	for (i=1;i<=n;i++)
	{
		cin>>x>>y;
		dax[i]=x+y;
		day[i]=x-y;
		//row[x+y].insert(make_pair(x-y,i));
		//col[x-y].insert(make_pair(x+y,i));
		//lsx.push_back(dax[i]);
		//lsy.push_back(day[i]);
		if (!mpr[x+y])
		{
			mpr[x+y]=++cntx;
			itr[cntx]=x+y;
			r1[cntx].insert(make_pair(2e15+7,-1));
		}
		if (!mpc[x-y])
		{
			mpc[x-y]=++cnty;
			itc[cnty]=x-y;
			c1[cntx].insert(make_pair(2e15+7,-1));
		}
	}
	/*sort(lsx.begin(),lsx.end());
	unique(lsx.begin(),lsx.end());
	sort(lsy.begin(),lsy.end());
	unique(lsy.begin(),lsy.end());
	for (i=1;i<=n;i++)
	{
		dax[i]=upper_bound(lsx.begin(),lsx.end(),dax[i])-lsx.begin()+2;
		day[i]=upper_bound(lsy.begin(),lsy.end(),day[i])-lsy.begin()+2;
	}*/
	dis=max(abs(dax[a]-dax[b]),abs(day[a]-day[b]));
	//for (i=1;i<=n;i++) cerr<<dax[i]<<' '<<day[i]<<endl; 
	for (i=1;i<=n;i++) dax[i]=mpr[dax[i]];
	for (i=1;i<=n;i++) day[i]=mpc[day[i]];
	for (i=1;i<=n;i++)
	{
		r1[dax[i]].insert(make_pair(itc[day[i]],i));
		c1[day[i]].insert(make_pair(itr[dax[i]],i));
		r2[dax[i]].push_back(itc[day[i]]);
		c2[day[i]].push_back(itr[dax[i]]);
	}
	for (i=0;i<=100000;i++)
	{
		sort(btoe(r2[i]));
		sort(btoe(c2[i]));
	}
	dfs(a);
//	dfs(b);
	cout<<ans/2;
	return 0;
}

Measured memory_bytes: 66048