#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N=100100;
ll i,j,k,n,a,b,ch,x,y,D;
ll fa[N],fb[N],d[N],pa[N],pb[N],sa[N],sb[N],fg[N];
struct poll { ll x,y;} P[N];
ll ans;
struct cc {
	ll x,y,id;
	bool operator < (const cc &n) const {
		if (x==n.x) return y<n.y;
		return x<n.x;
	}
} A[N];
struct dd {
	ll x,y,id;
	bool operator < (const dd &n) const {
		if (y==n.y) return x<n.x;
		return y<n.y;
	}
} B[N];
void R(ll &x) {
	x=0;ch=getchar();
	while (ch<'0' || '9'<ch) ch=getchar();
	while ('0'<=ch && ch<='9') x=x*10+ch-'0',ch=getchar();
}
void W(ll x) {
	if (x>=10) W(x/10);
	putchar(x%10+'0');
}
ll geta(ll x) {
	if (fa[x]==x) return x;
	return fa[x]=geta(fa[x]);
}
ll getb(ll x) {
	if (fb[x]==x) return x;
	return fb[x]=getb(fb[x]);
}
ll finda_upper(cc x) {
	ll l=1,r=n,mid;
	if (A[r]<x) return r+1;
	while (l<r) {
		mid=(l+r-1)>>1;
		if (A[mid]<x) l=mid+1;
		else r=mid;
	}
	return l;
}
ll findb_upper(dd x) {
	ll l=1,r=n,mid;
	if (B[r]<x) return r+1;
	while (l<r) {
		mid=(l+r-1)>>1;
		if (B[mid]<x) l=mid+1;
		else r=mid;
	}
	return l;
}
ll finda_lower(cc x) {
	ll l=1,r=n,mid;
	if (x<A[l]) return l-1;
	while (l<r) {
		mid=(l+r+1)>>1;
		if (x<A[mid]) r=mid-1;
		else l=mid;
	}
	return l;
}
ll findb_lower(dd x) {
	ll l=1,r=n,mid;
	if (x<B[l]) return l-1;
	while (l<r) {
		mid=(l+r+1)>>1;
		if (x<B[mid]) r=mid-1;
		else l=mid;
	}
	return l;
}
void worka(ll l,ll r) {
	if (l>r) return;
	for (k=geta(l);k<=r;k=geta(k)) {
		d[++j]=A[k].id;
		fg[d[j]]=1;
		fa[k]=k+1;
		fb[pb[A[k].id]]=pb[A[k].id]+1;
	}
}
void workb(ll l,ll r) {
	if (l>r) return;
	for (k=getb(l);k<=r;k=getb(k)) {
		d[++j]=B[k].id;
		fg[d[j]]=1;
		fb[k]=k+1;
		fa[pa[B[k].id]]=pa[B[k].id]+1;
	}
}

int main() {
	R(n);R(a);R(b);
	for (i=1;i<=n;i++) {
		R(x);R(y);
		P[i].x=x+y;
		P[i].y=x-y;
		A[i].x=x+y;
		A[i].y=x-y;
		A[i].id=i;
		B[i].x=x+y;
		B[i].y=x-y;
		B[i].id=i;
	}
	D=max(abs(P[a].x-P[b].x),abs(P[a].y-P[b].y));
	sort(A+1,A+n+1);
	sort(B+1,B+n+1);
	for (i=1;i<=n;i++) pa[A[i].id]=i;
	for (i=1;i<=n;i++) pb[B[i].id]=i;
	for (i=1;i<=n+1;i++) fa[i]=fb[i]=i;
	i=0;j=0;
	worka(pa[a],pa[a]);
	worka(pa[b],pa[b]);
	while (i<j) {
		i++;
		ll l,r;
		cc t1;
		dd t2;
		
		t1.x=P[d[i]].x-D;
		t1.y=P[d[i]].y-D;
		l=finda_upper(t1);
		t1.y=P[d[i]].y+D;
		r=finda_lower(t1);
		worka(l,r);
		
		t1.x=P[d[i]].x+D;
		t1.y=P[d[i]].y-D;
		l=finda_upper(t1);
		t1.y=P[d[i]].y+D;
		r=finda_lower(t1);
		worka(l,r);
		
		t2.y=P[d[i]].y-D;
		t2.x=P[d[i]].x-D+1;
		l=findb_upper(t2);
		t2.x=P[d[i]].x+D-1;
		r=findb_lower(t2);
		workb(l,r);
		
		t2.y=P[d[i]].y+D;
		t2.x=P[d[i]].x-D+1;
		l=findb_upper(t2);
		t2.x=P[d[i]].x+D-1;
		r=findb_lower(t2);
		workb(l,r);
	}
	for (i=1;i<=n;i++) {
		sa[i]=sa[i-1]+fg[A[i].id];
		sb[i]=sb[i-1]+fg[B[i].id];
	}
	for (i=1;i<=j;i++) {
		ll l,r;
		cc t1;
		dd t2;
		
		t1.x=P[d[i]].x-D;
		t1.y=P[d[i]].y-D;
		l=finda_upper(t1);
		t1.y=P[d[i]].y+D;
		r=finda_lower(t1);
		if (l<=r) ans+=sa[r]-sa[l-1];
		
		t1.x=P[d[i]].x+D;
		t1.y=P[d[i]].y-D;
		l=finda_upper(t1);
		t1.y=P[d[i]].y+D;
		r=finda_lower(t1);
		if (l<=r) ans+=sa[r]-sa[l-1];
		
		t2.y=P[d[i]].y-D;
		t2.x=P[d[i]].x-D+1;
		l=findb_upper(t2);
		t2.x=P[d[i]].x+D-1;
		r=findb_lower(t2);
		if (l<=r) ans+=sb[r]-sb[l-1];
		
		t2.y=P[d[i]].y+D;
		t2.x=P[d[i]].x-D+1;
		l=findb_upper(t2);
		t2.x=P[d[i]].x+D-1;
		r=findb_lower(t2);
		if (l<=r) ans+=sb[r]-sb[l-1];
	}
	W(ans/2);puts("");
}

Measured memory_bytes: 13568