// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<vector>

#include<set>

#include<map>

#include<queue>

using namespace std;

const int MAXN=100005;



struct Point

{

	int x,y,id;

	Point(int _x=0,int _y=0,int _id=0)

	{x=_x;y=_y;id=_id;}

};

struct Node

{

	int v,id;

	Node(int _v=0,int _id=0)

	{v=_v;id=_id;}

	bool operator < (const Node &t)const

	{return v<t.v;}

};

int Dis(Point A,Point B)

{return max(abs(A.x-B.x),abs(A.y-B.y));}



long long ans;

int N,A,B,R;

map<int,set<Node>> sX,sY;

map<int,vector<Node>> vX,vY;

vector<int> ansP;

Point P[MAXN];



queue<int> Q;



int main()

{

	cin>>N>>A>>B;

	for(int i=1;i<=N;i++)

	{

		int x,y,nx,ny;

		cin>>x>>y;

		nx=x-y;

		ny=x+y;

		P[i]=Point(nx,ny,i);

		if(i!=A&&i!=B)

		{

			sX[nx].insert(Node(ny,i));

			sY[ny].insert(Node(nx,i));

		}

		vX[nx].push_back(Node(ny,i));

		vY[ny].push_back(Node(nx,i));

	}

	R=Dis(P[A],P[B]);

	for(auto &it:vX)

		sort(it.second.begin(),it.second.end());

	for(auto &it:vY)

		sort(it.second.begin(),it.second.end());

	

	Q.push(A);

	Q.push(B);

	

	while(!Q.empty())

	{

		int u=Q.front();

		ansP.push_back(u);

		Q.pop();

		if(sX.count(P[u].x+R))

		{

			auto &vec=sX[P[u].x+R];

			auto l=vec.lower_bound(Node(P[u].y-R,0));

			for(auto it=l;it->v<=P[u].y+R&&it!=vec.end();)

			{

				Q.push(it->id);

				sY[P[it->id].y].erase(Node(P[it->id].x,it->id));

				vec.erase(it++);

			}

		}

		if(sX.count(P[u].x-R))

		{

			auto &vec=sX[P[u].x-R];

			auto l=vec.lower_bound(Node(P[u].y-R,0));

			for(auto it=l;it->v<=P[u].y+R&&it!=vec.end();)

			{

				Q.push(it->id);

				sY[P[it->id].y].erase(Node(P[it->id].x,it->id));

				vec.erase(it++);

			}

		}

		if(sY.count(P[u].y+R))

		{

			auto &vec=sY[P[u].y+R];

			auto l=vec.lower_bound(Node(P[u].x-R,0));

			for(auto it=l;it->v<=P[u].x+R&&it!=vec.end();)

			{

				Q.push(it->id);

				sX[P[it->id].x].erase(Node(P[it->id].y,it->id));

				vec.erase(it++);

			}

		}

		if(sY.count(P[u].y-R))

		{

			auto &vec=sY[P[u].y-R];

			auto l=vec.lower_bound(Node(P[u].x-R,0));

			for(auto it=l;it->v<=P[u].x+R&&it!=vec.end();)

			{

				Q.push(it->id);

				sX[P[it->id].x].erase(Node(P[it->id].y,it->id));

				vec.erase(it++);

			}

		}

	}

	

	for(auto u:ansP)

	{

		if(vX.count(P[u].x+R))

		{

			auto &vec=vX[P[u].x+R];

			auto l=lower_bound(vec.begin(),vec.end(),Node(P[u].y-R,0));

			auto r=upper_bound(vec.begin(),vec.end(),Node(P[u].y+R,0));

			ans+=r-l;

		}

		if(vX.count(P[u].x-R))

		{

			auto &vec=vX[P[u].x-R];

			auto l=lower_bound(vec.begin(),vec.end(),Node(P[u].y-R,0));

			auto r=upper_bound(vec.begin(),vec.end(),Node(P[u].y+R,0));

			ans+=r-l;

		}

		if(vY.count(P[u].y+R))

		{

			auto &vec=vY[P[u].y+R];

			auto l=lower_bound(vec.begin(),vec.end(),Node(P[u].x-R+1,0));

			auto r=upper_bound(vec.begin(),vec.end(),Node(P[u].x+R-1,0));

			ans+=r-l;

		}

		if(vY.count(P[u].y-R))

		{

			auto &vec=vY[P[u].y-R];

			auto l=lower_bound(vec.begin(),vec.end(),Node(P[u].x-R+1,0));

			auto r=upper_bound(vec.begin(),vec.end(),Node(P[u].x+R-1,0));

			ans+=r-l;

		}

	}

	

	ans/=2;

	cout<<ans<<endl;

	

	return 0;

}


// Optimized solution to the same problem (faster):
#include <algorithm>

#include <cstdio>

using namespace std;

const int N = 100010;

int n, x, y, len;

long long ans;

int a[N][2];

int idx[N], idy[N];

bool fx[N * 4], fy[N * 4];

int d[N];

bool bz[N];

int dis(int x, int y, int xx, int yy) {

    return max(abs(xx - x) , abs(yy - y));

}

void build(int l, int r, int s) {

    fx[s] = fy[s] = 1;

    if (l == r) return;

    build(l, (l + r)/ 2, s + s);

    build((l + r) / 2 + 1, r, s + s + 1);

}

void work1(int l, int r, int s) {

    if (!fy[s]) return;

    fy[s] = 0;

    if (l == r) {

        if (!bz[idy[l]])

            bz[d[++d[0]] = idy[l]] = 1;

        return;

    }

    work1(l, (l + r) / 2, s + s);

    work1((l + r) / 2 + 1, r, s + s + 1);

}



void work2(int l, int r, int s) {

    if (!fx[s]) return;

    fx[s] = 0;

    if (l == r) {

        if (!bz[idx[l]])

            bz[d[++d[0]] = idx[l]] = 1;

        return;

    }

    work2(l, (l + r) / 2, s + s);

    work2((l + r) / 2 + 1, r, s + s + 1);

}

void search1(int l, int r, int s, int ll, int rr, int lll) {

    if (a[idy[r]][1] < lll || a[idy[l]][1] > lll) return;

    if (a[idy[l]][1] == a[idy[r]][1] && (a[idy[l]][0] > rr ||a[idy[r]][0] < ll)) return;

    if (a[idy[l]][1] == a[idy[r]][1] && (a[idy[l]][0] >= ll &&a[idy[r]][0] <= rr)) {

        ans += r-l  +1;

        work1(l, r, s);

        return;

    }

    search1(l, (l + r ) / 2, s + s, ll, rr, lll);

    search1((l + r ) / 2 + 1, r, s + s + 1, ll, rr, lll);

    fy[s] = fy[s + s] | fy[s+s+1];

}



void search2(int l, int r, int s, int ll, int rr, int lll) {

    if (a[idx[r]][0] < lll || a[idx[l]][0] > lll) return;

    if (a[idx[l]][0] == a[idx[r]][0] && (a[idx[l]][1] > rr ||a[idx[r]][1] < ll)) return;

    if (a[idx[l]][0] == a[idx[r]][0] && (a[idx[l]][1] >= ll &&a[idx[r]][1] <= rr)) {

        ans += r-l  +1;

        work2(l, r, s);

        return;

    }

    search2(l, (l + r ) / 2, s + s, ll, rr, lll);

    search2((l + r ) / 2 + 1, r, s + s + 1, ll, rr, lll);

    fx[s] = fx[s + s] | fx[s+s+1];

}

int main() {

    scanf("%d %d %d", &n, &x, &y);

    for (int i =1; i <= n ; i ++) {

        int x ,y;

        scanf("%d %d", &x, &y);

        a[i][0] = x - y;

        a[i][1] = x + y;

        idx[i] = idy[i] = i;

    }

    len = dis(a[x][0], a[x][1], a[y][0], a[y][1]);

    sort(idx + 1, idx + n + 1, [](const int & x, const int & y) {

        return a[x][0] < a[y][0] || (a[x][0] == a[y][0] && a[x][1] < a[y][1]);

    });

    sort(idy + 1, idy + n + 1, [](const int & x, const int & y) {

        return a[x][1] < a[y][1] || (a[x][1] == a[y][1] && a[x][0] < a[y][0]);

    });

    build(1, n, 1);

    d[0] = 2;

    d[1] = x;

    d[2] = y;

    bz[x] = bz[y] = 1;

    for (int i = 1; i <= d[0]; i ++)

    {

        int x  = d[i];

        search1(1, n, 1, a[x][0] - len, a[x][0] + len, a[x][1] - len);

        search1(1, n, 1, a[x][0] - len, a[x][0] + len, a[x][1] + len);

        search2(1, n, 1, a[x][1] - len + 1, a[x][1] + len - 1, a[x][0] - len);

        search2(1, n, 1, a[x][1] - len + 1, a[x][1] + len - 1, a[x][0] + len);

    }

    printf("%lld\n", ans / 2);

    return 0;

}

// Fastest known solution for this problem: