#include<cstdio>
    #include<cmath>
    #include<cstring>
    #include<algorithm>
    #include<set>
    #include<map>
    #include<vector>
    #include<queue>
    using namespace std;
    const int N=100005;
    int n,a,b,x,y,cntx,cnty,d,tmp[N];
    long long ans;
    bool vis[N];
    map<int,int> idx,idy;
    queue<int> q;
    struct point{
    	int x,y,id;
    	point(){}
    	point(int x,int y,int id):x(x),y(y),id(id){}
    }p[N];
    struct data{
    	int v,id;
    	data(){}
    	data(int v,int id):v(v),id(id){}
    	bool operator < (const data &n) const{
    		return v==n.v?id<n.id:v<n.v;
    	}
    };
    set<data> sx[N],sy[N];
    vector<int> vx[N],vy[N]; 
    bool cmpx(point a,point b){
    	return a.x==b.x?a.y<b.y:a.x<b.x;
    }
    bool cmpy(point a,point b){
    	return a.y==b.y?a.x<b.x:a.y<b.y;
    }
    bool cmp(point a,point b){
    	return a.id<b.id;
    }
    int qx(int x,int l,int r){
    	return upper_bound(vx[x].begin(),vx[x].end(),r)-lower_bound(vx[x].begin(),vx[x].end(),l);
    }
    int qy(int x,int l,int r){
    	return upper_bound(vy[x].begin(),vy[x].end(),r)-lower_bound(vy[x].begin(),vy[x].end(),l);
    }
    void gaox(int x,int l,int r){
    	tmp[0]=0;
    	set<data>::iterator it1=sx[x].lower_bound(data(l,0));
    	set<data>::iterator it2=sx[x].upper_bound(data(r,1e9));
    	while(it1!=it2){
    		tmp[++tmp[0]]=it1->id;
    		if(!vis[tmp[tmp[0]]]){
    			vis[tmp[tmp[0]]]=true;
    			q.push(tmp[tmp[0]]);
    		}
    		it1++;
    	}
    	for(int i=1;i<=tmp[0];i++){
    		sx[idx[p[tmp[i]].x]].erase(data(p[tmp[i]].y,tmp[i]));
    		sy[idy[p[tmp[i]].y]].erase(data(p[tmp[i]].x,tmp[i]));
    	}
    }
    void gaoy(int x,int l,int r){
    	tmp[0]=0;
    	set<data>::iterator it1=sy[x].lower_bound(data(l,0));
    	set<data>::iterator it2=sy[x].upper_bound(data(r,1e9));
    	while(it1!=it2){
    		tmp[++tmp[0]]=it1->id;
    		if(!vis[tmp[tmp[0]]]){
    			vis[tmp[tmp[0]]]=true;
    			q.push(tmp[tmp[0]]);
    		}
    		it1++;
    	}
    	for(int i=1;i<=tmp[0];i++){
    		sx[idx[p[tmp[i]].x]].erase(data(p[tmp[i]].y,tmp[i]));
    		sy[idy[p[tmp[i]].y]].erase(data(p[tmp[i]].x,tmp[i]));
    	}
    }
    int main(){
    	scanf("%d%d%d",&n,&a,&b);
    	for(int i=1;i<=n;i++){
    		scanf("%d%d",&x,&y);
    		p[i]=point(x+y,x-y,i);
    	}
    	sort(p+1,p+n+1,cmpx);
    	for(int i=1;i<=n;i++){
    		idx[p[i].x]=i==1||p[i].x!=p[i-1].x?++cntx:cntx;
    		sx[cntx].insert(data(p[i].y,p[i].id));
    		vx[cntx].push_back(p[i].y);
    	}
    	sort(p+1,p+n+1,cmpy);
    	for(int i=1;i<=n;i++){
    		idy[p[i].y]=i==1||p[i].y!=p[i-1].y?++cnty:cnty;
    		sy[cnty].insert(data(p[i].x,p[i].id));
    		vy[cnty].push_back(p[i].x);
    	}
    	sort(p+1,p+n+1,cmp);
    	d=max(abs(p[a].x-p[b].x),abs(p[a].y-p[b].y));
    	vis[a]=true;
    	q.push(a);
    	while(!q.empty()){
    		int u=q.front(),v;
    		q.pop();
    		v=idx[p[u].x-d];
    		if(v){
    			ans+=qx(v,p[u].y-d,p[u].y+d);
    			gaox(v,p[u].y-d,p[u].y+d);
    		}
    		v=idx[p[u].x+d];
    		if(v){
    			ans+=qx(v,p[u].y-d,p[u].y+d);
    			gaox(v,p[u].y-d,p[u].y+d);
    		}
    		v=idy[p[u].y-d];
    		if(v){
    			ans+=qy(v,p[u].x-d+1,p[u].x+d-1);
    			gaoy(v,p[u].x-d,p[u].x+d);
    		}
    		v=idy[p[u].y+d];
    		if(v){
    			ans+=qy(v,p[u].x-d+1,p[u].x+d-1);
    			gaoy(v,p[u].x-d,p[u].x+d);
    		}
    	}
    	printf("%lld\n",ans/2);
    	return 0;
    }

Measured memory_bytes: 38528