#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

struct point{
	int x,y;
	bool operator<(const point &a)const{ return x!=a.x?x<a.x:y<a.y; }
};
bool cmp_y(const point &a,const point &b){ return a.y!=b.y?a.y<b.y:a.x<b.x; }

int D;
vector<point> P;
map<point,int> f;

vector<int> posX,posY;
vector<set<int>> X,Y; // X[i] : y-coordinate of points which have x-coordinate posX[i]
vector<vector<int>> X2,Y2; // same as X[i] (use vector instead of set)

long long ans=0;

void dfs(int u){
	int x=P[u].x,y=P[u].y;

	vector<int> next;

	// (x-D, y)
	int idx=lower_bound(posX.begin(),posX.end(),x-D)-posX.begin();
	if(idx<posX.size() && posX[idx]==x-D){
		for(auto it=X[idx].lower_bound(y-D);it!=X[idx].end()&&*it<=y+D;++it){
			next.emplace_back(f[{posX[idx],*it}]);
		}
		int l=lower_bound(X2[idx].begin(),X2[idx].end(),y-D)-X2[idx].begin();
		int r=upper_bound(X2[idx].begin(),X2[idx].end(),y+D)-X2[idx].begin();
		ans+=r-l;
	}

	// (x+D, y)
	idx=lower_bound(posX.begin(),posX.end(),x+D)-posX.begin();
	if(idx<posX.size() && posX[idx]==x+D){
		for(auto it=X[idx].lower_bound(y-D);it!=X[idx].end()&&*it<=y+D;++it){
			next.emplace_back(f[{posX[idx],*it}]);
		}
		int l=lower_bound(X2[idx].begin(),X2[idx].end(),y-D)-X2[idx].begin();
		int r=upper_bound(X2[idx].begin(),X2[idx].end(),y+D)-X2[idx].begin();
		ans+=r-l;
	}

	// (x, y-D)
	idx=lower_bound(posY.begin(),posY.end(),y-D)-posY.begin();
	if(idx<posY.size() && posY[idx]==y-D){
		for(auto it=Y[idx].lower_bound(x-D);it!=Y[idx].end()&&*it<=x+D;++it){
			next.emplace_back(f[{*it,posY[idx]}]);
		}
		int l=lower_bound(Y2[idx].begin(),Y2[idx].end(),x-D)-Y2[idx].begin();
		int r=upper_bound(Y2[idx].begin(),Y2[idx].end(),x+D)-Y2[idx].begin();
		ans+=r-l;
	}

	// (x, y+D)
	idx=lower_bound(posY.begin(),posY.end(),y+D)-posY.begin();
	if(idx<posY.size() && posY[idx]==y+D){
		for(auto it=Y[idx].lower_bound(x-D);it!=Y[idx].end()&&*it<=x+D;++it){
			next.emplace_back(f[{*it,posY[idx]}]);
		}
		int l=lower_bound(Y2[idx].begin(),Y2[idx].end(),x-D)-Y2[idx].begin();
		int r=upper_bound(Y2[idx].begin(),Y2[idx].end(),x+D)-Y2[idx].begin();
		ans+=r-l;
	}

	if(f.count({x-D,y-D})>0) ans--;
	if(f.count({x+D,y-D})>0) ans--;
	if(f.count({x-D,y+D})>0) ans--;
	if(f.count({x+D,y+D})>0) ans--;

	sort(next.begin(),next.end());
	next.erase(unique(next.begin(),next.end()),next.end());

	// delete next vertices from X and Y
	for(int v:next){
		int xx=P[v].x,yy=P[v].y;
		idx=lower_bound(posX.begin(),posX.end(),xx)-posX.begin();
		X[idx].erase(yy);
		idx=lower_bound(posY.begin(),posY.end(),yy)-posY.begin();
		Y[idx].erase(xx);
	}

	for(int v:next) dfs(v);
}


int main(){
	int n,a,b; scanf("%d%d%d",&n,&a,&b); a--; b--;
	P.resize(n);
	rep(i,n){
		int x,y; scanf("%d%d",&x,&y);
		P[i]={x+y,x-y};
		f[P[i]]=i;
	}
	D=max(abs(P[a].x-P[b].x),abs(P[a].y-P[b].y));

	{ // calc posX, X, and X2
		auto Q=P;
		sort(Q.begin(),Q.end());
		int pre=0;
		rep(i,n){
			if(i==n-1 || Q[i].x<Q[i+1].x){
				vector<int> tmp;
				for(int j=pre;j<=i;j++) tmp.emplace_back(Q[j].y);
				posX.emplace_back(Q[i].x);
				X.emplace_back(set<int>(tmp.begin(),tmp.end()));
				X2.emplace_back(tmp);
				pre=i+1;
			}
		}
	}

	{ // calc posY, Y, and Y2
		auto Q=P;
		sort(Q.begin(),Q.end(),cmp_y);
		int pre=0;
		rep(i,n){
			if(i==n-1 || Q[i].y<Q[i+1].y){
				vector<int> tmp;
				for(int j=pre;j<=i;j++) tmp.emplace_back(Q[j].x);
				posY.emplace_back(Q[i].y);
				Y.emplace_back(set<int>(tmp.begin(),tmp.end()));
				Y2.emplace_back(tmp);
				pre=i+1;
			}
		}
	}

	// delete P[a] from X and Y
	int idx;
	idx=lower_bound(posX.begin(),posX.end(),P[a].x)-posX.begin();
	X[idx].erase(P[a].y);
	idx=lower_bound(posY.begin(),posY.end(),P[a].y)-posY.begin();
	Y[idx].erase(P[a].x);

	dfs(a);
	cout<<ans/2<<endl;

	return 0;
}


Measured memory_bytes: 49052