// think twice code once
// Start:2016-12-11 21:00:47
// End  :
#include <bits/stdc++.h>
using namespace std;

#define rep(i, x, y) for(int i = (x), _ = (y); i <= _; ++ i)
#define per(i, x, y) for(int i = (x), _ = (y); i >= _; -- i)
#define dprintf(...) fprintf(stderr, __VA_ARGS__)
#define disp(x) cout << #x << " = " << x << "; "

typedef long long LL;

template <class T> bool chkmin(T& a, T b) { return a > b ? a = b, true : false; }
template <class T> bool chkmax(T& a, T b) { return a < b ? a = b, true : false; }

template <class T> void read(T& a) {
	char c = getchar(); T f = 1; a = 0;
	for(; !isdigit(c); c = getchar()) if(c == '-') f = -1;
	for(; isdigit(c); c = getchar()) a = a * 10 + c - '0';
	a *= f;
}

template <class T> void write(T a) {
	static int stk[60]; 
	int tp = 0;
	if(a < 0) putchar('-'), a = -a;
	do {
		stk[++ tp] = a % 10;
		a /= 10;
	}while(a);
	
	while(tp) putchar(stk[tp--] + '0');
}

const int maxN = 1e6 + 5;

typedef pair<LL, LL> pii;
typedef pair<pii, int> piii;
#define x first
#define y second
#define mp(x, y) make_pair(x, y)
#define mpp(x, y, z) mp(mp(x, y), z)

struct Edge {
	int v, next;
}G[maxN * 7];

int N;
int A, B;
int D;
int deg[maxN];
int st[maxN], e;
LL ans;
bool vis[maxN];
piii a[maxN];

void addedge(int u, int v) {
//	printf("addedge u = %d v = %d\n", u, v);
	G[++ e] = (Edge) {v, st[u]}; st[u] = e;
}

LL dist(pii a, pii b) {
	return max(abs(a.x - b.x), abs(b.y - a.y));
}

void solve(int lala) {
//	printf("while in solve----------\n");
	sort(a + 1, a + N + 1);
//	rep(i, 1, N) {
//		disp(a[i].x.x), disp(a[i].x.y), disp(a[i].y), puts("");
//	}
	
	rep(i, 1, N) {
		int lb = lower_bound(a + 1, a + N + 1, mpp(a[i].x.x + D, a[i].x.y - D, 0)) - a;
		int rb = upper_bound(a + 1, a + N + 1, mpp(a[i].x.x + D, a[i].x.y + D, N + 1)) - a - 1;

		if(rb - lb + 1 <= 0) continue;

		int l = a[lb].y;
		int r = a[rb].y;
		int c = a[i].y;

		if(a[i].x.x + D != a[lb].x.x || dist(a[i].x, a[lb].x) != D) continue;
		if(a[i].x.x + D != a[rb].x.x || dist(a[i].x, a[rb].x) != D) continue;

//		disp(c), disp(lb), disp(rb), puts("");

		deg[c] += rb - lb + 1;
		if((lala & 1) == 0 && (abs(a[rb].x.x - a[i].x.x) == D && abs(a[rb].x.y - a[i].x.y) == D))
			deg[c] --;
		if(lb != rb && (lala & 1) == 0 && (abs(a[lb].x.x - a[i].x.x) == D && abs(a[lb].x.y - a[i].x.y) == D))
			deg[c] --;

		addedge(c, l);
		addedge(l, c);
		addedge(c, r);
		addedge(r, c);

		if(i == N) continue;
		if(a[i].x.x == a[i + 1].x.x && dist(a[i + 1].x, a[rb].x) == D) {
			addedge(a[i].y, a[i + 1].y);
			addedge(a[i + 1].y, a[i].y);
		}
	}
}

void DFS(int u) {
//	printf("in DFS %d\n", u);
	vis[u] = 1;
	ans += deg[u];
	for(int e = st[u]; e; e = G[e].next) {
		int v = G[e].v;
		if(vis[v]) continue;
		DFS(v);
	}
}

int main() {
#ifdef Leeson
	freopen("C.in", "r", stdin);
	freopen("C.out", "w", stdout);
#endif

	read(N); read(A); read(B);
	rep(i, 1, N) {
		int x, y;
		read(x); read(y);
		a[i] = mpp(x + y, x - y, i);
//		disp(a[i].x.x), disp(a[i].x.y), disp(a[i].y), puts("");
	}

	D = dist(a[A].x, a[B].x);
//	disp(D), puts("");
//	solve();

	rep(i,1,4) {
		solve(i);
		rep(j, 1, N) {
			a[j] = mpp(a[j].x.y, -a[j].x.x, a[j].y);
		}
	}

//	rep(i, 1, N) disp(i), disp(deg[i]), puts("");

	DFS(A);

	cout << ans / 2 << endl;

	return 0;
}


Measured memory_bytes: 23552