#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<math.h>

using namespace std;

#define x first
#define y second
#define NMAX 100005
#define DEBUG 0
#define ll long long

ll n, a, b, sf, nX, nY;
long long answer;
pair<long long, long long> stiva[NMAX];
map<long long, long long> mapX, mapY;
map< pair<long long, long long>, ll> mapP;
vector<long long> listX[NMAX], listY[NMAX];
set<long long> setX[NMAX], setY[NMAX];
ll f[NMAX], incg;

void deletePoint(pair<long long,long long> P){
    ll indexX = mapX[P.x];
    ll indexY = mapY[P.y];
    setX[indexX].erase(P.y);
    setY[indexY].erase(P.x);
}

void read(){
    ll px, py;
    
    scanf("%lld%lld%lld",&n,&a,&b);
    for(int i = 1; i <= n; i++){
        scanf("%lld%lld",&px,&py);
        pair<ll,ll> P = make_pair(px + py, py - px);
        if(DEBUG) printf("Punct la %lld %lld\n", P.x, P.y);
        
        if(!mapX[P.x])
            mapX[P.x] = ++nX;
        if(!mapY[P.y])
            mapY[P.y] = ++nY;
        listX[mapX[P.x]].push_back(P.y);
        listY[mapY[P.y]].push_back(P.x);
        setX[mapX[P.x]].insert(P.y);
        setY[mapY[P.y]].insert(P.x);
        mapP[P] = 1;
        
        if(i == a || i == b){
            stiva[++sf] = P;
            deletePoint(P);
        }
    }
}

ll prepare(){
    for(int i = 1; i <= nX; i++){
        sort(listX[i].begin(), listX[i].end());
    }
    for(int i = 1; i <= nY; i++){
        sort(listY[i].begin(), listY[i].end());
    }
    return max(abs(stiva[1].x - stiva[2].x), abs(stiva[1].y - stiva[2].y));
}

ll binarySearch(int type, ll index, ll val){
    ll left = 0, right = (type ? listY[index].size() : listX[index].size()) - 1, ans = -1;
    while(left <= right){
        int mid = (left + right) / 2;
        ll elem = (type ? listY[index][mid] : listX[index][mid]);
        if(elem <= val){
            ans = mid;
            left = mid + 1;
        }
        else
            right = mid - 1;
    }
    return ans + 1;
}

void countPoints(ll index, ll left, ll right, int type){
    if(!index)
        return ;
    answer += binarySearch(type, index, right) - binarySearch(type, index, left - 1);
}

void countPairs(pair<ll,ll> P, ll D){
    ll ans = answer;
    countPoints(mapX[P.x - D], P.y - D, P.y + D, 0);
    countPoints(mapX[P.x + D], P.y - D, P.y + D, 0);
    countPoints(mapY[P.y - D], P.x - D, P.x + D, 1);
    countPoints(mapY[P.y + D], P.x - D, P.x + D, 1);
    for(int i = -1; i <= 1; i++){
        for(int j = -1; j <= 1; j++){
            if(!i || !j)
                continue;
            answer -= mapP[make_pair(P.x + i * D, P.y + j * D)];
        }
    }
    f[incg] = answer - ans;
}

void findPoints(ll coord, ll left, ll right, int type){
    if(DEBUG) printf("%d %lld %lld %lld\n", type, coord, left, right);
    ll index = (type ? mapY[coord] : mapX[coord]);
    if(!index)
        return ;
    set<ll>:: iterator it, it2;
    it = (type ? setY[index].lower_bound(left) : setX[index].lower_bound(left));
    it2 = it;
        
    for(; it != (type ? setY[index].end() : setX[index].end()); it = it2){
        ll val = (*it);
        if(val > right)
            break;
        pair<ll, ll> newP = (type ? make_pair(val, coord) : make_pair(coord, val));
        stiva[++sf] = newP;
        if(DEBUG) printf("am bagat %lld %lld\n", newP.x, newP.y);
        it2++;
        deletePoint(newP);
    }
}

void findNeighbours(pair<ll, ll> P, ll D){
    findPoints(P.x - D, P.y - D, P.y + D, 0);
    findPoints(P.x + D, P.y - D, P.y + D, 0);
    findPoints(P.y - D, P.x - D, P.x + D, 1);
    findPoints(P.y + D, P.x - D, P.x + D, 1);
}

void bfs(ll D){
    pair<ll, ll> sol[NMAX];
    int nrsol = 0;
    ll inc = 1;
    while(inc <= sf){
        incg = inc;
        pair<ll, ll> P = stiva[inc];
        if(!mapP[P])
            printf("ce plm\n");
        if(DEBUG) printf("Am punctul %lld %lld\n",P.x, P.y);
        countPairs(P, D);
        findNeighbours(P, D);
        if(!f[inc])
            sol[++nrsol] = P;
        inc++;
    }
    //sort(sol + 1,sol + nrsol + 1);
    //for(int i = 1; i <= nrsol; i++)
      //  printf("%lld %lld|", sol[i].x,sol[i].y);
    //printf("\n");
}

int main (){
    
    read();
    ll D = prepare();
    bfs(D);
    //printf("%lld\n", D);
    printf("%lld\n", answer / 2);
    
    return 0;
}



Measured memory_bytes: 79744