#include"bits/stdc++.h"

#define int ll 

#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x,"r",stdin)
#define fw(x) freopen(x,"w",stdout)
#define iout(x) printf("%d\n",x)
#define lout(x) printf("%lld\n",x)
#define REP(x,l,u) for(ll x = (l);x<=(u);x++)
#define RREP(x,l,u) for(ll x = (l);x>=(u);x--)
#define mst(x,a) memset(x,a,sizeof(x))
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define MP make_pair
#define se second
#define fi first
#define dbg(x) cout<<#x<<" = "<<(x)<<endl;
#define sz(x) ((int)x.size())
#define cl(x) x.clear()

typedef  long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
using namespace std;

const int maxn = 100010;
const int mod = 1e9+7;
const int MAX = 1000000010;
const double eps = 1e-6;
const double PI = acos(-1);

template<typename T> inline void read(T &x){
x=0;T f=1;char ch;do{ch=getchar();if(ch=='-')f=-1;}while(ch<'0'||ch>'9');do x=x*10+ch-'0',ch=getchar();while(ch<='9'&&ch>='0');x*=f;
}

template<typename A,typename B> inline void read(A&x,B&y){read(x);read(y);}
template<typename A,typename B,typename C> inline void read(A&x,B&y,C&z){read(x);read(y);read(z);}
template<typename A,typename B,typename C,typename D> inline void read(A&x,B&y,C&z,D&w){read(x);read(y);read(z);read(w);}
template<typename A,typename B> inline A fexp(A x,B p){A ans=1;for(;p;p>>=1,x=1LL*x*x%mod)if(p&1)ans=1LL*ans*x%mod;return ans;}
template<typename A,typename B> inline A fexp(A x,B p,A mo){A ans=1;for(;p;p>>=1,x=1LL*x*x%mo)if(p&1)ans=1LL*ans*x%mo;return ans;}

int n,a,b,D;

int X[maxn],Y[maxn],id[maxn];

map<int,int> mpx,mpy;int xt,yt;

set<PII> hasx[maxn],hasy[maxn];

bool vi[maxn];

bool cmpx(int x,int y){
	return X[x]<X[y]||(X[x]==X[y]&&Y[x]<Y[y]);
}

bool cmpy(int x,int y){
	return Y[x]<Y[y]||(Y[x]==Y[y]&&X[x]<X[y]);
}
void dfs(int i){
	if(vi[i])return;
	vi[i]=1;
	int t;
	if(t=mpx[X[i]-D]){
		set<PII>::iterator it=hasx[t].lower_bound(MP(Y[i]-D,0));
		while(it!=hasx[t].end()&&(*it).fi<=Y[i]+D){
			int v=(*it).se;
			hasx[t].erase(it);
			dfs(v);
			it=hasx[t].lower_bound(MP(Y[i]-D,0));
		}
	}
	if(t=mpx[X[i]+D]){
		set<PII>::iterator it=hasx[t].lower_bound(MP(Y[i]-D,0));
		while(it!=hasx[t].end()&&(*it).fi<=Y[i]+D){
			int v=(*it).se;
			hasx[t].erase(it);
			dfs(v);
			it=hasx[t].lower_bound(MP(Y[i]-D,0));
		}
	}
	if(t=mpy[Y[i]-D]){
		set<PII>::iterator it=hasy[t].lower_bound(MP(X[i]-D,0));
		while(it!=hasy[t].end()&&(*it).fi<=X[i]+D){
			int v=(*it).se;
			hasy[t].erase(it);
			dfs(v);
			it=hasy[t].lower_bound(MP(X[i]-D,0));
		}
	}
	if(t=mpy[Y[i]+D]){
		set<PII>::iterator it=hasy[t].lower_bound(MP(X[i]-D,0));
		while(it!=hasy[t].end()&&(*it).fi<=X[i]+D){
			int v=(*it).se;
			hasy[t].erase(it);
			dfs(v);
			it=hasy[t].lower_bound(MP(X[i]-D,0));
		}
	}
}

void Work(){
	REP(i,1,n)if(!mpx[X[i]])mpx[X[i]]=++xt;
	REP(i,1,n)if(!mpy[Y[i]])mpy[Y[i]]=++yt;
	REP(i,1,n)hasx[mpx[X[i]]].insert(MP(Y[i],i)),hasy[mpy[Y[i]]].insert(MP(X[i],i));
	dfs(a);
	assert(vi[b]);
	REP(i,1,n)id[i]=i;
	sort(id+1,id+n+1,cmpx);
	REP(i,1,n)hasx[mpx[X[i]]].clear();
	REP(x,1,n){
		int i=id[x];
		hasx[mpx[X[i]]].insert(MP(Y[i],x));
	}
	ll ans=0;
	REP(i,1,n)if(vi[i]){
		int t;set<PII>::iterator it;
		if(t=mpx[X[i]-D]){
			if((it=hasx[t].lower_bound(MP(Y[i]-D,0)))!=hasx[t].end()&&(*it).fi<=Y[i]+D){
				ans-=(*it).se;
				it=hasx[t].upper_bound(MP(Y[i]+D,n+1));
				it--;
				ans+=(*it).se+1;
			}
		}
//		cout<<ans<<endl;
	}
//	cout<<endl;
	sort(id+1,id+n+1,cmpy);
	REP(i,1,n)hasy[mpy[Y[i]]].clear();
	REP(x,1,n){
		int i=id[x];
		hasy[mpy[Y[i]]].insert(MP(X[i],x));
	}
	REP(i,1,n)if(vi[i]){
		int t;set<PII>::iterator it;
		if(t=mpy[Y[i]-D]){
			if((it=hasy[t].upper_bound(MP(X[i]-D,n+1)))!=hasy[t].end()&&(*it).fi<X[i]+D){
				ans-=(*it).se;
				it=hasy[t].lower_bound(MP(X[i]+D,0));
				it--;
				ans+=(*it).se+1;
			}
		}
//		cout<<ans<<endl;
	}
	cout<<ans<<endl;
}

void Init(){
	read(n,a,b);
	REP(i,1,n)read(X[i],Y[i]);
	REP(i,1,n){
		int x=X[i]+Y[i],y=X[i]-Y[i];
		X[i]=x;Y[i]=y;
	}
	D=max(abs(X[a]-X[b]),abs(Y[a]-Y[b]));
/*	cout<<endl;
	REP(i,1,n)cout<<X[i]<<' '<<Y[i]<<endl;
	cout<<endl;
	REP(i,1,n)REP(j,i+1,n)if(max(abs(X[i]-X[j]),abs(Y[i]-Y[j]))==D)cout<<i<<' '<<j<<endl;*/
}


#undef int
int main(){
	Init();
	Work();
	return 0;
}


Measured memory_bytes: 52992