#include<iostream>
    #include<algorithm>
    #include<vector>
    #include<queue>
    #include<set>
    #include<map>
    #include<complex>
    #define lol(i,n) for(int i=0;i<n;i++)
    #define mod 1000000007
    #define inf 1000000007000000007
    typedef long long ll;
    using namespace std;
     
    vector<ll>::iterator itp,itq;
    typedef pair<ll,ll> P;
    set<P> setx,sety;
    set<P>::iterator ita;
    map<int,vector<ll> >datx,daty;
    map<int,vector<ll> >::iterator itm;
    queue<P> Q;
    vector<ll> tmpv;
    ll ans=0,k;
     
    void BFS(ll x,ll y){
		//cout<<"#"<<x<<" "<<y<<endl;
    	
    	//x-k.begin
    	tmpv=daty[x-k];
    	itp=lower_bound(tmpv.begin(),tmpv.end(),y-k);
    	itq=upper_bound(tmpv.begin(),tmpv.end(),y+k);
    	ans+=itq-itp;
    	//if(itq-itp>0)cout<<itq-tmpv.begin()<<" "<<itp-tmpv.begin()<<" "<<"x-k"<<endl;
    	
    	ita=setx.lower_bound(make_pair(x-k,y-k));
    	while(ita!=setx.end()){
    		if(ita->first>x-k||ita->second>y+k)break;
    		Q.push(make_pair(ita->first,ita->second));
    		sety.erase(make_pair(ita->second,ita->first));
    		ita=setx.erase(ita);
    	}
    	//x-k.end
    	
    	//x+k.begin
    	tmpv=daty[x+k];
    	itp=lower_bound(tmpv.begin(),tmpv.end(),y-k);
    	itq=upper_bound(tmpv.begin(),tmpv.end(),y+k);
    	ans+=itq-itp;
    	//if(itq-itp>0)cout<<itq-tmpv.begin()<<" "<<itp-tmpv.begin()<<" "<<"x+k"<<endl;
    	
    	ita=setx.lower_bound(make_pair(x+k,y-k));
    	while(ita!=setx.end()){
    		if(ita->first>x+k||ita->second>y+k)break;
    		Q.push(make_pair(ita->first,ita->second));
    		sety.erase(make_pair(ita->second,ita->first));
    		ita=setx.erase(ita);
    	}
    	//x+k.end
    	
    	//y-k.begin
    	tmpv=datx[y-k];
    	itp=lower_bound(tmpv.begin(),tmpv.end(),x-k+1);
    	itq=upper_bound(tmpv.begin(),tmpv.end(),x+k-1);
    	ans+=itq-itp;
    	//if(itq-itp>0)cout<<itq-tmpv.begin()<<" "<<itp-tmpv.begin()<<" "<<"y-k"<<endl;
    	
    	ita=sety.lower_bound(make_pair(y-k,x-k+1));
    	while(ita!=sety.end()){
    		if(ita->first>y-k||ita->second>x+k-1)break;
    		Q.push(make_pair(ita->second,ita->first));
    		setx.erase(make_pair(ita->second,ita->first));
    		ita=sety.erase(ita);
    	}
    	//y-k.end
    	
    	//y+k.begin
    	tmpv=datx[y+k];
    	itp=lower_bound(tmpv.begin(),tmpv.end(),x-k+1);
    	itq=upper_bound(tmpv.begin(),tmpv.end(),x+k-1);
    	ans+=itq-itp;
    	//if(itq-itp>0)cout<<itq-tmpv.begin()<<" "<<itp-tmpv.begin()<<" "<<"y+k"<<endl;
    	
    	ita=sety.lower_bound(make_pair(y+k,x-k+1));
    	while(ita!=sety.end()){
    		if(ita->first>y+k||ita->second>x+k-1)break;
    		Q.push(make_pair(ita->second,ita->first));
    		setx.erase(make_pair(ita->second,ita->first));
    		ita=sety.erase(ita);
    	}
    	//y+k.end
    }
     
    int main(){
    	int n,f,g;
    	cin>>n>>f>>g;f--,g--;
    	ll sx,sy,gx,gy;
    	lol(i,n){
    		ll dx,dy;cin>>dx>>dy;
    		if(i==f)sx=dx,sy=dy;
    		if(i==g)gx=dx,gy=dy;
    		
    		ll x=dx+dy,y=dx-dy;
    		datx[y].push_back(x);
    		daty[x].push_back(y);
    		if(i==f)Q.push(make_pair(x,y));
    		if(i==g)Q.push(make_pair(x,y));
    		if(i!=f&&i!=g){
				setx.insert(make_pair(x,y));
				sety.insert(make_pair(y,x));
			}
    		//cout<<"%"<<x<<" "<<y<<endl;
    	}
    	
    	itm=datx.begin();
    	while(itm!=datx.end()){
			sort(itm->second.begin(),itm->second.end());
			itm++;
		}
		itm=daty.begin();
    	while(itm!=daty.end()){
			sort(itm->second.begin(),itm->second.end());
			itm++;
		}
		
    	k=abs(sx-gx)+abs(sy-gy);
    	while(!Q.empty()){
    		ll x=Q.front().first;
    		ll y=Q.front().second;
    		Q.pop();
    		BFS(x,y);
    	}
    	cout<<ans/2<<endl;
    	return 0;
    }


Measured memory_bytes: 39680