#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);

using namespace std;

namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(const pair<S,T>&p)const{return ((size_t)1e9+7)*hash<S>()(p.first)+hash<T>()(p.second);}};template<class T>struct hash<vector<T>>{size_t operator()(const vector<T> &v)const{size_t h=0;for(auto i : v)h=h*((size_t)1e9+7)+hash<T>()(i)+1;return h;}};}
template<class T>ostream& operator<<(ostream &os, const vector<T> &v){os<<"[ ";rep(i,v.size())os<<v[i]<<(i==v.size()-1?" ]":", ");return os;}template<class T>ostream& operator<<(ostream &os,const set<T> &v){os<<"{ "; for(const auto &i:v)os<<i<<", ";return os<<"}";}
template<class T,class U>ostream& operator<<(ostream &os,const map<T,U> &v){os<<"{";for(const auto &i:v)os<<" "<<i.first<<": "<<i.second<<",";return os<<"}";}template<class T,class U>ostream& operator<<(ostream &os,const pair<T,U> &p){return os<<"("<<p.first<<", "<<p.second<<")";}
void dbgprint(const string &fmt){cerr<<endl;}template<class H,class... T>void dbgprint(const string &fmt,const H &h,const T&... r){cerr<<fmt.substr(0,fmt.find(","))<<"= "<<h<<" ";dbgprint(fmt.substr(fmt.find(",")+1),r...);}
typedef long long ll;typedef vector<int> vi;typedef pair<ll,int> pi;const int inf = (int)1e9;const double INF = 1e12, EPS = 1e-9;

int p[100010];
int root(int x){
	if(x == p[x]) return x;
	return p[x] = root(p[x]);
}
void merge(int a, int b){
	a = root(a), b = root(b);
	if(a != b) p[b] = a;
}

int main(){
	cin.tie(0); cin.sync_with_stdio(0);
	
	int n, s, t; cin >> n >> s >> t; s--; t--;
	vector<ll> x, y;
	rep(i, n){
		int a, b; cin >> a >> b;
		x.pb(a + b);
		y.pb(a - b);
		p[i] = i;
	}
	map<ll, vector<pair<ll, int>>> tate, yoko;
	map<ll, vi> tates, yokos;
	rep(i, n){
		yoko[y[i]].emplace_back(x[i], i);
		tate[x[i]].emplace_back(y[i], i);
	}
	for(auto &p : tate) sort(all(p.second));
	for(auto &p : yoko) sort(all(p.second));
	ll dist = max(abs(x[s] - x[t]), abs(y[s] - y[t]));
	dbg(dist);
	
	vi cnt;
	rep(i, n){
		ll x0 = x[i] - dist, x1 = x[i] + dist;
		ll y0 = y[i] - dist, y1 = y[i] + dist;
		int k = 0;
		
		if(yoko.count(y1)) k += lower_bound(all(yoko[y1]), pi(x1, 0)) - lower_bound(all(yoko[y1]), pi(x0, 0));
		if(tate.count(x0)) k += lower_bound(all(tate[x0]), pi(y1, 0)) - lower_bound(all(tate[x0]), pi(y0, 0));
		
		const auto ins = [](int i, map<ll, vector<pair<ll, int>>> &yoko, map<ll, vi> &yokos, ll y1, ll x1, ll x0){
			if(yoko.count(y1)){
				if(!yokos.count(y1)) yokos[y1].resize(yoko[y1].size());
				int l = lower_bound(all(yoko[y1]), pi(x0, 0)) - yoko[y1].begin();
				int r = lower_bound(all(yoko[y1]), pi(x1 + 1, 0)) - yoko[y1].begin();
				//dbg(l, r); dbg(y1, yoko[y1], x1, x0);
				
				if(l < r){
					merge(i, yoko[y1][l].second);
					yokos[y1][l]++, yokos[y1][r - 1]--;
				}
			}
		};
		//dbg(i, x0, x1);
		ins(i, yoko, yokos, y1, x1, x0);
		ins(i, yoko, yokos, y0, x1, x0);
		ins(i, tate, tates, x1, y1, y0);
		ins(i, tate, tates, x0, y1, y0);
		cnt.pb(k);
	}
	//rep(i, n) dbg(i, cnt[i]);
	
	const auto mg = [&](map<ll, vector<pair<ll, int>>> &yoko, map<ll, vi> &yokos){
		for(const auto &it : yoko){
			const vector<pair<ll, int>> &ps = it.second;
			vi &sum = yokos[it.first];
			rep(i, sum.size() - 1){
				sum[i + 1] += sum[i];
				if(sum[i]) merge(ps[i].second, ps[i + 1].second);
			}
		}
	};
	mg(yoko, yokos);
	mg(tate, tates);
	
	ll ans = 0;
	rep(i, n) if(root(i) == root(s)) ans += cnt[i];
	cout << ans << endl;
	
	return 0;
}

Measured memory_bytes: 39532