#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<ctime>
#include<map>
#include<bitset>
#include<set>
#include<assert.h>
#include<chrono>
#include<random>
#define LL long long
#define mp(x,y) make_pair(x,y)
#define pll pair<long long,long long>
#define pii pair<int,int>
#define SZ(x) ((int)x.size())
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
inline LL read()
{
	LL f=1,x=0;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
int stack[20];
template<typename T>inline void write(T x)
{
	if(x<0){putchar('-');x=-x;}
    if(!x){putchar('0');return;}
    int top=0;
    while(x)stack[++top]=x%10,x/=10;
    while(top)putchar(stack[top--]+'0');
}
template<typename T>inline void pr1(T x){write(x);putchar(' ');}
template<typename T>inline void pr2(T x){write(x);putchar('\n');}
template<typename T>inline void chkmin(T &x,T y){x=x<y?x:y;}
template<typename T>inline void chkmax(T &x,T y){x=x>y?x:y;}
const int MAXN=100005;
map<int,int> ro,co;int tr,tc;
multiset<pii> row[MAXN],col[MAXN];
multiset<pii>::iterator it;
int n,X[MAXN],Y[MAXN],A,B,D,vis[MAXN];
int xrnk[MAXN],yrnk[MAXN];
int getx(int x)
{
	if(ro.find(x)==ro.end())return ro[x]=++tr;
	return ro[x];
}
int gety(int x)
{
	if(co.find(x)==co.end())return co[x]=++tc;
	return co[x];
}
void insert(int x,int y,int o)
{
	row[getx(x)].insert(mp(y,o));
	col[gety(y)].insert(mp(x,o));
}
void insert_rnk(int x,int y,int o)
{
	row[getx(x)].insert(mp(y,yrnk[o]));
	col[gety(y)].insert(mp(x,xrnk[o]));
}
queue<int> li;
void inserty(int l,int r,int ypos)
{
	if(co.find(ypos)==co.end())return ;ypos=gety(ypos);
	while(1)
	{
		if(!SZ(col[ypos]))return ;
		it=col[ypos].lower_bound(mp(l,0));
		if(it==col[ypos].end()||it->first>r)return ;li.push(it->second);col[ypos].erase(it);
	}
}
void insertx(int l,int r,int xpos)
{
	if(ro.find(xpos)==ro.end())return ;xpos=getx(xpos);
	while(1)
	{
		if(!SZ(row[xpos]))return ;
		it=row[xpos].lower_bound(mp(l,0));
		if(it==row[xpos].end()||it->first>r)return ;li.push(it->second);row[xpos].erase(it);
	}
}
LL ans=0;
void solvex(int l,int r,int xpos)
{
	if(ro.find(xpos)==ro.end())return ;xpos=getx(xpos);
	it=row[xpos].lower_bound(mp(l,0));if(it==row[xpos].end())return ;int F=it->second;
	it=row[xpos].lower_bound(mp(r+1,0));if(it==row[xpos].end())ans+=SZ(row[xpos])-F+1;
	else ans+=it->second-F;
}
void solvey(int l,int r,int ypos)
{
	if(co.find(ypos)==co.end())return ;ypos=gety(ypos);
	it=col[ypos].lower_bound(mp(l,0));if(it==col[ypos].end())return ;int F=it->second;
	it=col[ypos].lower_bound(mp(r+1,0));if(it==col[ypos].end())ans+=SZ(col[ypos])-F+1;
	else ans+=it->second-F;
}
int main()
{
	n=read();A=read();B=read();
	for(int i=1;i<=n;i++)
	{
		int x=read(),y=read();
		X[i]=x+y;Y[i]=x-y;
		insert(X[i],Y[i],i);
	}
	D=max(abs(X[A]-X[B]),abs(Y[A]-Y[B]));
	li.push(A);
	while(!li.empty())
	{
		int p=li.front();li.pop();
		if(vis[p])continue;vis[p]=1;
		inserty(X[p]-D,X[p]+D,Y[p]+D);
		inserty(X[p]-D,X[p]+D,Y[p]-D);
		insertx(Y[p]-D,Y[p]+D,X[p]+D);
		insertx(Y[p]-D,Y[p]+D,X[p]-D);
	}
	for(int i=1;i<=tc;i++)col[i].clear();
	for(int i=1;i<=tr;i++)row[i].clear();
	for(int i=1;i<=n;i++)insert(X[i],Y[i],i);
	for(int id=1;id<=tr;id++)
	{
		int cnt=0;
		for(auto p:row[id])yrnk[p.second]=++cnt;
	}
	for(int id=1;id<=tc;id++)
	{
		int cnt=0;
		for(auto p:col[id])xrnk[p.second]=++cnt;
	}
	for(int i=1;i<=tc;i++)col[i].clear();
	for(int i=1;i<=tr;i++)row[i].clear();
	for(int i=1;i<=n;i++)insert_rnk(X[i],Y[i],i);
	for(int i=1;i<=n;i++)if(vis[i])
	{
		int p=i;
		solvey(X[p]-D+1,X[p]+D,Y[p]+D);
		solvey(X[p]-D,X[p]+D-1,Y[p]-D);
		solvex(Y[p]-D+1,Y[p]+D,X[p]-D);
		solvex(Y[p]-D,Y[p]+D-1,X[p]+D);
	}pr2(ans/2);
	return 0;
}



Measured memory_bytes: 29056