#include <stdio.h>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
map<long long,set<long long>> rd,ld;
map<pair<long long,long long>,int> pos;
long long x[100001],y[100001];
int main()
{
	int n,a,b;
	scanf("%d%d%d",&n,&a,&b);
	for (int i=1;i<=n;++i)
	{
		scanf("%lld%lld",x+i,y+i);
		rd[x[i]-y[i]].insert(x[i]);
		ld[x[i]+y[i]].insert(x[i]);
		pos[make_pair(x[i],y[i])]=i;
	}
	queue<int> q;
	q.push(a);
	rd[x[a]-y[a]].erase(x[a]);
	ld[x[a]+y[a]].erase(x[a]);
	long long dist=abs(x[a]-x[b])+abs(y[a]-y[b]);
	vector<pair<long long,long long>> cc;
	while (!q.empty())
	{
		int f=q.front();
		q.pop();
		long long fx=x[f],fy=y[f];
		rd[fx-fy].erase(fx);
		ld[fx+fy].erase(fx);
		cc.push_back(make_pair(fx,fy));
		//    -
		//   -
		//  -
		// x
		if (ld.count(fx-dist+fy))
		{
			set<long long>& st=ld[fx-dist+fy];
			for (set<long long>::iterator it=st.lower_bound(fx-dist);it!=st.end()&&*it<fx;it=st.erase(it))
			{
				rd[*it-(fy-(*it-(fx-dist)))].erase(*it);
				q.push(pos[make_pair(*it,fy-(*it-(fx-dist)))]);
			}
		}
		//    x
		//     -
		//      -
		//       -
		if (rd.count(fx-dist-fy))
		{
			set<long long>& st=rd[fx-dist-fy];
			for (set<long long>::iterator it=st.lower_bound(fx-dist+1);it!=st.end()&&*it<=fx;it=st.erase(it))
			{
				ld[*it+(fy+(*it-(fx-dist)))].erase(*it);
				q.push(pos[make_pair(*it,fy+(*it-(fx-dist)))]);
			}
		}
		// -
		//  -
		//   -
		//    x
		if (rd.count(fx-(fy-dist)))
		{
			set<long long>& st=rd[fx-(fy-dist)];
			for (set<long long>::iterator it=st.lower_bound(fx);it!=st.end()&&*it<fx+dist;it=st.erase(it))
			{
				ld[*it+(fy-((fx+dist)-*it))].erase(*it);
				q.push(pos[make_pair(*it,fy-((fx+dist)-*it))]);
			}
		}
		//       x
		//      -
		//     -
		//    -
		if (ld.count(fx+(fy+dist)))
		{
			set<long long>& st=ld[fx+(fy+dist)];
			for (set<long long>::iterator it=st.lower_bound(fx+1);it!=st.end()&&*it<=fx+dist;it=st.erase(it))
			{
				rd[*it-(fy+((fx+dist)-*it))].erase(*it);
				q.push(pos[make_pair(*it,fy+((fx+dist)-*it))]);
			}
		}
	}
	map<long long,vector<long long>> nrd,nld;
	for (size_t i=0;i<cc.size();++i)
	{
		long long cx=cc[i].first,cy=cc[i].second;
		nrd[cx-cy].push_back(cx);
		nld[cx+cy].push_back(cx);
	}
	for (map<long long,vector<long long>>::iterator it=nrd.begin();it!=nrd.end();++it)
		sort(it->second.begin(),it->second.end());
	for (map<long long,vector<long long>>::iterator it=nld.begin();it!=nld.end();++it)
		sort(it->second.begin(),it->second.end());
	long long ans=0;
	for (size_t i=0;i<cc.size();++i)
	{
		long long fx=cc[i].first,fy=cc[i].second;
		//    -
		//   -
		//  -
		// x
		if (nld.count(fx-dist+fy))
		{
			vector<long long>& vec=nld[fx-dist+fy];
			ans+=lower_bound(vec.begin(),vec.end(),fx)-lower_bound(vec.begin(),vec.end(),fx-dist);
		}
		//    x
		//     -
		//      -
		//       -
		if (nrd.count(fx-dist-fy))
		{
			vector<long long>& vec=nrd[fx-dist-fy];
			ans+=upper_bound(vec.begin(),vec.end(),fx)-upper_bound(vec.begin(),vec.end(),fx-dist);
		}
		// -
		//  -
		//   -
		//    x
		if (nrd.count(fx-(fy-dist)))
		{
			vector<long long>& vec=nrd[fx-(fy-dist)];
			ans+=lower_bound(vec.begin(),vec.end(),fx+dist)-lower_bound(vec.begin(),vec.end(),fx);
		}
		//       x
		//      -
		//     -
		//    -
		if (nld.count(fx+(fy+dist)))
		{
			vector<long long>& vec=nld[fx+(fy+dist)];
			ans+=upper_bound(vec.begin(),vec.end(),fx+dist)-upper_bound(vec.begin(),vec.end(),fx);
		}
	}
	printf("%lld",ans/2);
	return 0;
}


Measured memory_bytes: 47732