#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int,int>P;
typedef long long ll;

int x[200000],y[200000];
map<P,int>mp;
set<int>xa[200000],ya[200000];
vector<int>xv[200000],yv[200000];
vector<int>xs,ys;
vector<int>res;

int d;

void dfs(int v){
	[&](){
		int id=lower_bound(xs.begin(),xs.end(),x[v]-d)-xs.begin();
		if(id==xs.size()||xs[id]!=x[v]-d)return;
		while(1){
			auto it=xa[id].lower_bound(y[v]-d);
			if(it==xa[id].end()||*it>y[v]+d)break;
			int k=mp[P(xs[id],*it)];
			res.push_back(k);
			ya[lower_bound(ys.begin(),ys.end(),*it)-ys.begin()].erase(x[v]-d);
			xa[id].erase(it);
			dfs(k);
		}
	}();
	[&](){
		int id=lower_bound(xs.begin(),xs.end(),x[v]+d)-xs.begin();
		if(id==xs.size()||xs[id]!=x[v]+d)return;
		while(1){
			auto it=xa[id].lower_bound(y[v]-d);
			if(it==xa[id].end()||*it>y[v]+d)break;
			int k=mp[P(xs[id],*it)];
			res.push_back(k);
			ya[lower_bound(ys.begin(),ys.end(),*it)-ys.begin()].erase(x[v]+d);
			xa[id].erase(it);
			dfs(k);
		}
	}();
	[&](){
		int id=lower_bound(ys.begin(),ys.end(),y[v]-d)-ys.begin();
		if(id==ys.size()||ys[id]!=y[v]-d)return;
		while(1){
			auto it=ya[id].lower_bound(x[v]-d);
			if(it==ya[id].end()||*it>x[v]+d)break;
			int k=mp[P(*it,ys[id])];
			res.push_back(k);
			xa[lower_bound(xs.begin(),xs.end(),*it)-xs.begin()].erase(y[v]-d);
			ya[id].erase(it);
			dfs(k);
		}
	}();
	[&](){
		int id=lower_bound(ys.begin(),ys.end(),y[v]+d)-ys.begin();
		if(id==ys.size()||ys[id]!=y[v]+d)return;
		while(1){
			auto it=ya[id].lower_bound(x[v]-d);
			if(it==ya[id].end()||*it>x[v]+d)break;
			int k=mp[P(*it,ys[id])];
			res.push_back(k);
			xa[lower_bound(xs.begin(),xs.end(),*it)-xs.begin()].erase(y[v]+d);
			ya[id].erase(it);
			dfs(k);
		}
	}();
}
ll cnt=0;
void count_pairs(int v){
	[&](){
		int id=lower_bound(xs.begin(),xs.end(),x[v]-d)-xs.begin();
		if(id==xs.size()||xs[id]!=x[v]-d)return;
		auto it=lower_bound(xv[id].begin(),xv[id].end(),y[v]-d);
		auto it2=upper_bound(xv[id].begin(),xv[id].end(),y[v]+d);
		cnt+=it2-it;
	}();
	[&](){
		int id=lower_bound(xs.begin(),xs.end(),x[v]+d)-xs.begin();
		if(id==xs.size()||xs[id]!=x[v]+d)return;
		auto it=lower_bound(xv[id].begin(),xv[id].end(),y[v]-d);
		auto it2=upper_bound(xv[id].begin(),xv[id].end(),y[v]+d);
		cnt+=it2-it;
	}();
	[&](){
		int id=lower_bound(ys.begin(),ys.end(),y[v]-d)-ys.begin();
		if(id==ys.size()||ys[id]!=y[v]-d)return;
		auto it=lower_bound(yv[id].begin(),yv[id].end(),x[v]-d+1);
		auto it2=upper_bound(yv[id].begin(),yv[id].end(),x[v]+d-1);
		cnt+=it2-it;
	}();
	[&](){
		int id=lower_bound(ys.begin(),ys.end(),y[v]+d)-ys.begin();
		if(id==ys.size()||ys[id]!=y[v]+d)return;
		auto it=lower_bound(yv[id].begin(),yv[id].end(),x[v]-d+1);
		auto it2=upper_bound(yv[id].begin(),yv[id].end(),x[v]+d-1);
		cnt+=it2-it;
	}();
}
int main(){
	int n,a,b;cin>>n>>a>>b;a--;b--;
	rep(i,n){
		int X,Y;scanf("%d%d",&X,&Y);
		x[i]=X-Y;y[i]=X+Y;
		xs.push_back(x[i]);
		ys.push_back(y[i]);
		mp[P(x[i],y[i])]=i;
	}
	d=max(abs(x[a]-x[b]),abs(y[a]-y[b]));
	sort(xs.begin(),xs.end());xs.erase(unique(xs.begin(),xs.end()),xs.end());
	sort(ys.begin(),ys.end());ys.erase(unique(ys.begin(),ys.end()),ys.end());
	rep(i,n){
		int xx=lower_bound(xs.begin(),xs.end(),x[i])-xs.begin(),
			yy=lower_bound(ys.begin(),ys.end(),y[i])-ys.begin();
		xa[xx].insert(y[i]);
		ya[yy].insert(x[i]);
	}
	res.push_back(a);
	xa[lower_bound(xs.begin(),xs.end(),x[a])-xs.begin()].erase(y[a]);
	ya[lower_bound(ys.begin(),ys.end(),y[a])-ys.begin()].erase(x[a]);
	dfs(a);
	rep(i,n){
		int xx=lower_bound(xs.begin(),xs.end(),x[i])-xs.begin(),
			yy=lower_bound(ys.begin(),ys.end(),y[i])-ys.begin();
		xv[xx].push_back(y[i]);
		yv[yy].push_back(x[i]);
	}
	rep(i,xs.size()){
		sort(xv[i].begin(),xv[i].end());
	}
	rep(i,ys.size()){
		sort(yv[i].begin(),yv[i].end());
	}
	for(auto i:res){
		count_pairs(i);
		//~ cout<<"i,cnt="<<i<<','<<cnt<<endl;
		//~ cnt=0;
	}
	cout<<cnt/2<<endl;
}

Measured memory_bytes: 57072