#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/hash_policy.hpp>
const int mod = 1e9 + 7;
inline int mul( int x , int y ){ return 1LL * x * y % mod ;}
int power_mod( int x , int y ){int ret = 1;while( y ){if( y & 1 ) ret = mul( ret , x );y >>= 1;x = mul( x , x );}return ret;}
inline int read(){int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;}
using namespace std;
const int maxn = 1e5 + 50;

int N , del[maxn];
pair < int , int > pf[maxn];
unordered_map < int , set < pair < int , int > > > fx , fy ;
unordered_map < int , vector < int > > subx , suby;
queue < int > pq;

int main(int argc,char *argv[]){
	N = read();
	int ida = read() , idb = read();
	for(int i = 1 ; i <= N ; ++ i){
		int x = read() , y = read();
		pf[i] = make_pair( x , y );
		int newx = x + y , newy = x - y;
		if( i != ida ){
			fx[newx].insert( make_pair( newy , i ) );
			fy[newy].insert( make_pair( newx , i ) );
		}
		subx[newx].push_back( newy );
		suby[newy].push_back( newx );
	}
	for(auto & it : subx)
		sort( it.second.begin() , it.second.end() );
	for(auto & it : suby)
		sort( it.second.begin() , it.second.end() );
	long long ans = 0;
	int D = abs( pf[ida].first - pf[idb].first ) + abs( pf[ida].second - pf[idb].second );
	pq.push( ida );
	del[ida] = 1;
	while(!pq.empty()){
		int id = pq.front() ; pq.pop();
		int x = pf[id].first + pf[id].second , y = pf[id].first - pf[id].second;
		long long preans = ans;
		int checky1 = y - D;
		int checky2 = y + D;
		int checkx1 = x - D;
		int checkx2 = x + D;

		if( suby.count( checky1 ) ){
			auto & wr = suby[checky1];
			ans += upper_bound( wr.begin() , wr.end() , checkx2 - 1 ) - lower_bound( wr.begin() , wr.end() , checkx1 + 1 );
		}

		if( suby.count( checky2 ) ){
			auto & wr = suby[checky2];
			ans += upper_bound( wr.begin() , wr.end() , checkx2 - 1 ) - lower_bound( wr.begin() , wr.end() , checkx1 + 1 );
		}

		if( subx.count( checkx1 ) ){
			auto & wr = subx[checkx1];
			ans += upper_bound( wr.begin() , wr.end() , checky2 ) - lower_bound( wr.begin() , wr.end() , checky1 );
		}

		if( subx.count( checkx2 ) ){
			auto & wr = subx[checkx2];
			ans += upper_bound( wr.begin() , wr.end() , checky2 ) - lower_bound( wr.begin() , wr.end() , checky1 );
		}

		if( fx.count( checkx1 ) ){
			auto & all = fx[checkx1];
			auto l = all.lower_bound( make_pair( checky1 , -1 ) );
			while( l != all.end() ){
				if( l->first > checky2 )
					break;
				if( !del[l->second] ){
					del[l->second] = 1;
					pq.push(l->second);
				}
				l = all.erase( l );
			}
		}

		if( fx.count( checkx2 ) ){
			auto & all = fx[checkx2];
			auto l = all.lower_bound( make_pair( checky1 , -1 ) );
			while( l != all.end() ){
				if( l->first > checky2 )
					break;
				if( !del[l->second] ){
					del[l->second] = 1;
					pq.push(l->second);
				}
				l = all.erase( l );
			}
		}

		if( fy.count( checky1 ) ){
			auto & all = fy[checky1];
			auto l = all.lower_bound( make_pair( checkx1 , -1 ) );
			while( l != all.end() ){
				if( l->first > checkx2 )
					break;
				if( !del[l->second] ){
					del[l->second] = 1;
					pq.push(l->second);
				}
				l = all.erase( l );
			}
		}

		if( fy.count( checky2 ) ){
			auto & all = fy[checky2];
			auto l = all.lower_bound( make_pair( checkx1 , -1 ) );
			while( l != all.end() ){
				if( l->first > checkx2 )
					break;
				if( !del[l->second] ){
					del[l->second] = 1;
					pq.push(l->second);
				}
				l = all.erase( l );
			}
		}

	}
	ans >>= 1;
	printf( "%lld\n" , ans );
	return 0;
}

Measured memory_bytes: 41732