#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef complex<double> point;
#define xx real()
#define yy imag()

#define REP(i, a, b) for(int i = (a); i < (int)(b); i++)
#define REPN(i, a, b) for(int i = (a); i <= (int)(b); i++)
#define FA(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define SZ(x) (int)(x).size()
#define BE(x) (x).begin(), (x).end()
#define SORT(x) sort(BE(x))
#define _1 first
#define _2 second

#define x1 gray_cat_x1
#define y1 gray_cat_y1

template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

#define file "I1"

const double EPS = 1e-9;
const double PI = acos(-1.);
const int INF = 1e9;
const ll MOD = 1e9 + 7;

const int MAXN = 1e5 + 5;

pair<ll, ll> pt[MAXN];

map<ll, vector<ll> > coord_x_y, coord_y_x;
map<ll, set<pair<ll, int> > > ind_x_y, ind_y_x;

ll d;
ll ans;

queue<int> qq;

int used[MAXN];

void process_vertice(int a){
	//printf("Add %d %lld %lld\n", a, pt[a]._1, pt[a]._2);
	if (used[a]){
		return;
	}
	//assert(!used[a]);
	used[a] = 1;
	
	qq.push(a);
	ll x = pt[a]._1, y = pt[a]._2;
	ind_x_y[x].erase(mp(y, a));
	ind_y_x[y].erase(mp(x, a));
}

void add_coords(map<ll, vector<ll> > &coords, ll coord_0, ll coord_1_l, ll coord_1_r){
	if (coords.find(coord_0) == coords.end()){
		return;
	}
	vector<ll> &tmp = coords[coord_0];
	int l = lower_bound(tmp.begin(), tmp.end(), coord_1_l) - tmp.begin();
	int r = lower_bound(tmp.begin(), tmp.end(), coord_1_r + 1) - tmp.begin();
	ans += r - l;
}

void add_new_vertices(map<ll, set<pair<ll, int> > > &inds, ll coord_0, ll coord_1_l, ll coord_1_r){
	if (inds.find(coord_0) == inds.end()){
		return;
	}
	set<pair<ll, int> > &tmp = inds[coord_0];
	vi indices_to_process;
	for(set<pair<ll, int> >:: iterator it = tmp.lower_bound(mp(coord_1_l, -1)); it != tmp.end(); it++){
		if (it->_1 > coord_1_r){
			break;
		}
		indices_to_process.pb(it->_2);
	}
	
	for(int i = 0; i < SZ(indices_to_process); i++){
		process_vertice(indices_to_process[i]);
	}
}

void bfs(int s){
	while(!qq.empty()){
		s = qq.front();
		qq.pop();
		ll x = pt[s]._1, y = pt[s]._2;
		
		//printf("Visit %d %lld %lld\n", s, pt[s]._1, pt[s]._2);
		
		add_coords(coord_x_y, x - d, y - d, y + d);
		add_coords(coord_x_y, x + d, y - d, y + d);
		add_coords(coord_y_x, y - d, x - d + 1, x + d - 1);
		add_coords(coord_y_x, y + d, x - d + 1, x + d - 1);
		add_new_vertices(ind_x_y, x - d, y - d, y + d);
		add_new_vertices(ind_x_y, x + d, y - d, y + d);
		add_new_vertices(ind_y_x, y - d, x - d + 1, x + d - 1);
		add_new_vertices(ind_y_x, y + d, x - d + 1, x + d - 1);
	}
}

void solve(){
	int n;
	scanf("%d", &n);
	
	int a, b;
	scanf("%d%d", &a, &b);
	a--;
	b--;
	
	REP(i, 0, n){
		int x0, y0;
		scanf("%d%d", &x0, &y0);
		ll x = x0 + y0, y = x0 - y0;
		
		pt[i] = mp(x, y);
		
		coord_x_y[x].pb(y);
		coord_y_x[y].pb(x);
		
		ind_x_y[x].insert(mp(y, i));
		ind_y_x[y].insert(mp(x, i));
	}
	
	FA(it, coord_x_y){
		SORT(it->second);
	}
	FA(it, coord_y_x){
		SORT(it->second);
	}
	
	d = max(abs(pt[a]._1 - pt[b]._1), abs(pt[a]._2 - pt[b]._2));
	process_vertice(a);
	bfs(a);
	printf("%lld\n", ans / 2);
}   

int main(){

    //freopen(file".in", "r", stdin); freopen(file".out", "w", stdout);
    int t = 1;
    //cin >> t;
    while(t--){
        solve();    
    }
}


Measured memory_bytes: 49920