#include <bits/stdc++.h>
using namespace std;

using ll=long long;
#define int ll

#define FOR(i,a,b) for(int i=int(a);i<int(b);i++)
#define REP(i,b) FOR(i,0,b)
#define MP make_pair
#define PB push_back
#define ALL(x) x.begin(),x.end()
#define REACH cerr<<"reached line "<<__LINE__<<endl
#define DBG(x) cerr<<"line "<<__LINE__<<" "<<#x<<":"<<x<<endl

using pii=pair<int,int>;
using vi=vector<int>;
using ld=long double;

template<class T,class U>
ostream& operator<<(ostream& os,const pair<T,U>& p){
	os<<"("<<p.first<<","<<p.second<<")";
	return os;
}

template<class T>
ostream& operator <<(ostream& os,const vector<T>& v){
	os<<"[";
	REP(i,(int)v.size()){
		if(i)os<<",";
		os<<v[i];
	}
	os<<"]";
	return os;
}

int read(){
	int i;
	scanf("%lld",&i);
	return i;
}

void printSpace(){
	printf(" ");
}

void printEoln(){
	printf("\n");
}

void print(int x,int suc=1){
	printf("%lld",x);
	if(suc==1)
		printEoln();
	if(suc==2)
		printSpace();
}

string readString(){
	static char buf[3341919];
	scanf("%s",buf);
	return string(buf);
}

char* readCharArray(){
	static char buf[3341919];
	static int bufUsed=0;
	char* ret=buf+bufUsed;
	scanf("%s",ret);
	bufUsed+=strlen(ret)+1;
	return ret;
}

template<class T,class U>
void chmax(T& a,U b){
	if(a<b)
		a=b;
}

template<class T,class U>
void chmin(T& a,U b){
	if(a>b)
		a=b;
}

template<class T>
T Sq(const T& t){
	return t*t;
}

struct Point{
	int x,y;
};

signed main(){
	int n=read(),a=read()-1,b=read()-1;
	vector<Point> ps;
	REP(i,n){
		int x=read(),y=read();
		ps.PB(Point{x-y,x+y});
	}
	vector<bool> reach(n,false);
	const int dif=max(abs(ps[a].x-ps[b].x),abs(ps[a].y-ps[b].y));
	vi tmp;
	{
		map<int,map<int,int>> v,h;
		REP(i,n){
			v[ps[i].y][ps[i].x]=i;
			h[ps[i].x][ps[i].y]=i;
		}
		queue<int> qu;
		auto hog=[&](int x){
			qu.push(x);
			reach[x]=true;
			v[ps[x].y].erase(ps[x].x);
			h[ps[x].x].erase(ps[x].y);
		};
		hog(a);
		hog(b);
		while(!qu.empty()){
			int i=qu.front();
			qu.pop();
			{
				int y=ps[i].y+dif;
				auto itr=v[y].lower_bound(ps[i].x-dif);
				while(itr!=v[y].end()&&itr->first<=ps[i].x+dif){
					tmp.PB(itr->second);
					++itr;
				}
				for(auto u:tmp)
					hog(u);
				tmp.clear();
			}
			{
				int y=ps[i].y-dif;
				auto itr=v[y].lower_bound(ps[i].x-dif);
				while(itr!=v[y].end()&&itr->first<=ps[i].x+dif){
					tmp.PB(itr->second);
					++itr;
				}
				for(auto u:tmp)
					hog(u);
				tmp.clear();
			}
			{
				int x=ps[i].x+dif;
				auto itr=h[x].lower_bound(ps[i].y-dif);
				while(itr!=h[x].end()&&itr->first<=ps[i].y+dif){
					tmp.PB(itr->second);
					++itr;
				}
				for(auto u:tmp)
					hog(u);
				tmp.clear();
			}
			{
				int x=ps[i].x-dif;
				auto itr=h[x].lower_bound(ps[i].y-dif);
				while(itr!=h[x].end()&&itr->first<=ps[i].y+dif){
					tmp.PB(itr->second);
					++itr;
				}
				for(auto u:tmp)
					hog(u);
				tmp.clear();
			}
		}
	}
	int ans=0;
	{
		map<int,vi> v,h;
		REP(i,n){
			v[ps[i].y].PB(ps[i].x);
			h[ps[i].x].PB(ps[i].y);
		}
		for(auto& waf:v)
			sort(ALL(waf.second));
		for(auto& waf:h)
			sort(ALL(waf.second));
		REP(i,n)if(reach[i]){
			{
				int y=ps[i].y+dif;
				ans+=upper_bound(ALL(v[y]),ps[i].x+dif)-lower_bound(ALL(v[y]),ps[i].x-dif);
			}
			{
				int y=ps[i].y-dif;
				ans+=upper_bound(ALL(v[y]),ps[i].x+dif)-lower_bound(ALL(v[y]),ps[i].x-dif);
			}
			{
				int x=ps[i].x+dif;
				ans+=lower_bound(ALL(h[x]),ps[i].y+dif)-upper_bound(ALL(h[x]),ps[i].y-dif);
			}
			{
				int x=ps[i].x-dif;
				ans+=lower_bound(ALL(h[x]),ps[i].y+dif)-upper_bound(ALL(h[x]),ps[i].y-dif);
			}
		}
	}
	cout<<ans/2<<endl;
}


Measured memory_bytes: 46960