#include<cstdio>
#include<cstring>
#include<algorithm>
#define N 100010
#define ll long long
using namespace std;

struct aa{int x, y, id;}a[N], a1[N], a2[N];
struct data{int l, r;}b[N][4];
int n, X, Y, x, y, D, f1[N], f2[N], flag[N], op, cl, d[N], p, L, R, pos1[N], pos2[N];
ll ans;

inline int abs(int x){return max(x, -x);}

inline bool cmp1(aa a, aa b){
	if(a.x!=b.x)return a.x<b.x;
	return a.y<b.y;
}
inline bool cmp2(aa a, aa b){
	if(a.y!=b.y)return a.y<b.y;
	return a.x<b.x;
}

inline int gether1(int x){return f1[x]?f1[x]=gether1(f1[x]):x;}
inline int gether2(int x){return f2[x]?f2[x]=gether2(f2[x]):x;}
inline void ins(int i){flag[i]=1; f1[pos1[i]]=pos1[i]+1; f2[pos2[i]]=pos2[i]+1; d[++cl]=i;}

int main(){
	scanf("%d%d%d", &n, &X, &Y);
	for(int i=1; i<=n; i++){scanf("%d%d", &x, &y); a[i].x=x+y; a[i].y=x-y; a[i].id=i;}
	D=max(abs(a[X].x-a[Y].x), abs(a[X].y-a[Y].y));
	memcpy(a1, a, sizeof(a1)); memcpy(a2, a, sizeof(a2));
	sort(a1+1, a1+1+n, cmp1); sort(a2+1, a2+1+n, cmp2);
	for(int i=1; i<=n; i++)pos1[a1[i].id]=i;
	for(int i=1; i<=n; i++)pos2[a2[i].id]=i;
	op=1; cl=0;
	for(int i=1; i<=n; i++){
		x=a1[i].id; p=a[x].x-D; L=a[x].y-D; R=a[x].y+D;
		while(op<=n&&(a1[op].x<p||(a1[op].x==p&&a1[op].y<L)))op++;
		while(cl<n&&(a1[cl+1].x<p||(a1[cl+1].x==p&&a1[cl+1].y<=R)))cl++;
		b[x][0].l=op; b[x][0].r=cl;
	}
	op=n; cl=n+1;
	for(int i=n; i; i--){
		x=a1[i].id; p=a[x].x+D; L=a[x].y-D; R=a[x].y+D;
		while(op&&(a1[op].x>p||(a1[op].x==p&&a1[op].y>R)))op--;
		while(cl>1&&(a1[cl-1].x>p||(a1[cl-1].x==p&&a1[cl-1].y>=L)))cl--;
		b[x][1].l=cl; b[x][1].r=op;
	}
	op=1; cl=0;
	for(int i=1; i<=n; i++){
		x=a2[i].id; p=a[x].y-D; L=a[x].x-D+1; R=a[x].x+D-1;
		while(op<=n&&(a2[op].y<p||(a2[op].y==p&&a2[op].x<L)))op++;
		while(cl<n&&(a2[cl+1].y<p||(a2[cl+1].y==p&&a2[cl+1].x<=R)))cl++;
		b[x][2].l=op; b[x][2].r=cl;
	}
	op=n; cl=n+1;
	for(int i=n; i; i--){
		x=a2[i].id; p=a[x].y+D; L=a[x].x-D+1; R=a[x].x+D-1;
		while(op&&(a2[op].y>p||(a2[op].y==p&&a2[op].x>R)))op--;
		while(cl>1&&(a2[cl-1].y>p||(a2[cl-1].y==p&&a2[cl-1].x>=L)))cl--;
		b[x][3].l=cl; b[x][3].r=op;
	}
	memset(f1, 0, sizeof(f1)); memset(f2, 0, sizeof(f2)); memset(flag, 0, sizeof(flag));
	ins(X); ins(Y);
	op=0; cl=2; d[1]=X; d[2]=Y;
	while(op<cl){
		op++; x=d[op];
		for(int i=gether1(b[x][0].l); i<=b[x][0].r; i=gether1(i+1))ins(a1[i].id);
		for(int i=gether1(b[x][1].l); i<=b[x][1].r; i=gether1(i+1))ins(a1[i].id);
		for(int i=gether2(b[x][2].l); i<=b[x][2].r; i=gether2(i+1))ins(a2[i].id);
		for(int i=gether2(b[x][3].l); i<=b[x][3].r; i=gether2(i+1))ins(a2[i].id);
	}
	ans=0;
	for(int i=1; i<=n; i++)if(flag[i])
		for(int j=0; j<=3; j++)ans+=b[i][j].r-b[i][j].l+1;
	ans>>=1; printf("%lld", ans);
	return 0;
}