#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}

#define N 100010
vector<P> vx[N], vy[N];
vector<ll> x, y, x2, y2, x3, y3;
ll n, a, b, d;
map<P, ll> cnt;
map<ll, ll> ix, iy;
bool used[N];
set<P> sx[N], sy[N];

ll dist(int a, int b){
	return max(abs(x[a]-x[b]), abs(y[a]-y[b]));
}

void comp(vector<ll> &x, const vector<ll> &y, vector<ll> &z, map<ll, ll> &ix){
	z = vector<ll>(y);
	sort(all(z));
	UNIQUE(z);
	x = vector<ll>(y.size());
	rep(i, y.size()){
		x[i] = lower_bound(z.begin(), z.end(), y[i])-z.begin();
	}
	rep(i, z.size()) ix[z[i]] = i;
}

int main(){
	cin>>n>>a>>b; a--; b--;
	x = y = vector<ll>(n);
	rep(i, n){
		ll xx, yy;
		cin>>xx>>yy;
		x[i] = xx+yy;
		y[i] = xx-yy;
		++cnt[P(x[i], y[i])];
	}
	d = dist(a, b);
	comp(x2, x, x3, ix); comp(y2, y, y3, iy);
	rep(i, n){
		vy[x2[i]].push_back(P(y[i], i)); sy[x2[i]].insert(P(y[i], i));
		vx[y2[i]].push_back(P(x[i], i)); sx[y2[i]].insert(P(x[i], i));
	}
	rep(i, x3.size()) sort(all(vy[i]));
	rep(i, y3.size()) sort(all(vx[i]));
	ll res = 0;
	queue<int> q;
	q.push(a);
	used[a] = true;
	while(!q.empty()){
		int u = q.front(); q.pop();
		ll lx = x[u]-d, rx = lx+2*d, ly = y[u]-d, ry = ly+2*d;;
		for(ll xx = lx; xx <= rx; xx+=2*d){
			if(!ix.count(xx)) continue;
			int px = ix[xx];
			ll l = lower_bound(all(vy[px]), P(ly, 0))-vy[px].begin();
			ll r = upper_bound(all(vy[px]), P(ry, INF))-vy[px].begin();
			//cerr<<u<<" "<<l<<" "<<r<<endl;
			//cerr<<xx<<" "<<vy[px].size()<<endl;
			res += r-l;
			res -= cnt[P(xx, ly)]+cnt[P(xx, ry)];
			while(true){
				auto it = sy[px].lower_bound(P(ly, 0));
				if(it==sy[px].end() || it->fst>ry) break;
				int v = it->snd;
				sy[px].erase(it);
				if(used[v]) continue;
				used[v] = true;
				q.push(v);
			}
		}
		for(ll yy = ly; yy <= ry; yy+=2*d){
			if(!iy.count(yy)) continue;
			int py = iy[yy];
			ll l = lower_bound(all(vx[py]), P(lx, 0))-vx[py].begin();
			ll r = upper_bound(all(vx[py]), P(rx, INF))-vx[py].begin();
			res += r-l;
			while(true){
				auto it = sx[py].lower_bound(P(lx, 0));
				if(it==sx[py].end() || it->fst>rx) break;
				int v = it->snd;
				sx[py].erase(it);
				if(used[v]) continue;
				used[v] = true;
				q.push(v);
			}

		}
		//cout<<u<<"'s res: "<<res-res2<<endl;
	}
	cout<<res/2<<endl;
	return 0;
}


Measured memory_bytes: 59648