#include <set>
#include <queue>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <iostream>
#include <algorithm>
#define R register
typedef long long ll;
typedef std::pair<int,int> pr;
#define mp(x,y) std::make_pair(x,y)
#define fir first
#define sec second
namespace IO{
	char buf[1<<15],*S,*T;
	inline char gc(){
		if (S==T){
			T=(S=buf)+fread(buf,1,1<<15,stdin);
			if (S==T) return EOF;
		}return *S++;
	}
	inline int read(){
		R int x; R bool f; R char c;
		for (f=0; (c=gc())<'0'||c>'9'; f=c=='-');
		for (x=c^'0'; (c=gc())>='0'&&c<='9'; x=(x<<1)+(x<<3)+(c^'0'));
		return f?-x:x;
	}
}
#define MN 100005
#define inf 0x7fffffff
std::queue<int> que;
std::set<pr> xx[MN],yy[MN];
std::set<pr>::iterator it;
std::vector<int> xpt[MN],ypt[MN];
int n,a,b,x[MN],y[MN],p[MN],q[MN],pn,qn,dist,tmp[MN],tn;bool vis[MN];ll ans;
inline void del(int id){
	xx[x[id]].erase(mp(q[y[id]],id));
	yy[y[id]].erase(mp(p[x[id]],id));
}
inline void insx(int x,int l,int r){
	R int y=std::lower_bound(p+1,p+pn+1,x)-p;if (p[y]!=x) return;
	tn=0;for (it=xx[y].lower_bound(mp(l,0)); it!=xx[y].end()&&it->fir<=r; ++it)
		tmp[++tn]=it->sec,que.push(it->sec);
	for (R int i=1; i<=tn; ++i) del(tmp[i]);
}
inline void insy(int x,int l,int r){
	R int y=std::lower_bound(q+1,q+qn+1,x)-q;if (q[y]!=x) return;
	tn=0;for (it=yy[y].lower_bound(mp(l,0)); it!=yy[y].end()&&it->fir<=r; ++it)
		tmp[++tn]=it->sec,que.push(it->sec);
	for (R int i=1; i<=tn; ++i) del(tmp[i]);
}
inline int qpos(std::vector<int> p,int x){
	R int l=0,r=p.size()-1,m;
	while(l<r){
		m=l+r>>1;
		if (p[m]>=x) r=m;
		else l=m+1; 
	}return l;
}
inline int solvex(int x,int l,int r){
	R int y=std::lower_bound(p+1,p+pn+1,x)-p;if (p[y]!=x||r<l) return 0;
	return qpos(xpt[y],r+1)-qpos(xpt[y],l);
}
inline int solvey(int x,int l,int r){
	R int y=std::lower_bound(q+1,q+qn+1,x)-q;if (q[y]!=x||r<l) return 0;
	return qpos(ypt[y],r+1)-qpos(ypt[y],l);
}
int main(){
	n=IO::read(),a=IO::read(),b=IO::read();
	for (R int i=1,x,y; i<=n; ++i){
		x=IO::read(),y=IO::read();
		::x[i]=p[i]=x+y,::y[i]=q[i]=x-y;
	}
	dist=std::max(abs(x[a]-x[b]),abs(y[a]-y[b]));
	std::sort(p+1,p+n+1);pn=std::unique(p+1,p+n+1)-p-1;
	std::sort(q+1,q+n+1);qn=std::unique(q+1,q+n+1)-q-1;
	for (R int i=1; i<=n; ++i){
		x[i]=std::lower_bound(p+1,p+pn+1,x[i])-p;
		y[i]=std::lower_bound(q+1,q+qn+1,y[i])-q;
		xx[x[i]].insert(mp(q[y[i]],i));
		yy[y[i]].insert(mp(p[x[i]],i));
	}
	que.push(a);del(a);while(!que.empty()){
		a=que.front();que.pop();vis[a]=1;
		insx(p[x[a]]+dist,q[y[a]]-dist,q[y[a]]+dist);
		insx(p[x[a]]-dist,q[y[a]]-dist,q[y[a]]+dist);
		insy(q[y[a]]+dist,p[x[a]]-dist,p[x[a]]+dist);
		insy(q[y[a]]-dist,p[x[a]]-dist,p[x[a]]+dist);
	}
	for (R int i=1; i<=n; ++i)
		if (vis[i]) 
			xpt[x[i]].push_back(q[y[i]]),
			ypt[y[i]].push_back(p[x[i]]);
	for (R int i=1; i<=pn; ++i) xpt[i].push_back(inf),std::sort(xpt[i].begin(),xpt[i].end());
	for (R int i=1; i<=qn; ++i) ypt[i].push_back(inf),std::sort(ypt[i].begin(),ypt[i].end());             
	for (R int i=1; i<=n; ++i)
		if (vis[i]){
			ans+=solvex(p[x[i]]+dist,q[y[i]]-dist,q[y[i]]+dist);
			ans+=solvex(p[x[i]]-dist,q[y[i]]-dist,q[y[i]]+dist);
			ans+=solvey(q[y[i]]+dist,p[x[i]]-dist+1,p[x[i]]+dist-1);
			ans+=solvey(q[y[i]]-dist,p[x[i]]-dist+1,p[x[i]]+dist-1);
		}                 
	printf("%lld\n",ans/2);
	return 0;                 
}

Measured memory_bytes: 28416