#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

const long long INF = 1e18;
//const ll mod = 1000000007;
ll N, a, b;
ll x[105000], y[105000];
ll ans = 0;
set<ll> connected;
map<ll, vector<l_l>> X;
map<ll, vector<l_l>> Y;
set<l_l> st;
queue<ll> que;
ll D;
ll num[105000];

int main() {
    cin >> N >> a >> b;
    a--;
    b--;
    for(int i = 0; i < N; i++) {
        ll tmpX, tmpY;
        cin >> tmpX >> tmpY;
        x[i] = tmpX + tmpY;
        y[i] = tmpX - tmpY;
        X[x[i]].push_back({y[i], i});
        Y[y[i]].push_back({x[i], i});
        st.insert({x[i], y[i]});
    }
    for(auto &tmp : X) {
        sort(tmp.second.begin(), tmp.second.end());
    }
    for(auto &tmp : Y) {
        sort(tmp.second.begin(), tmp.second.end());
    }
    D = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
    for(int i = 0; i < N; i++) {
        for(ll j = -1; j <= 1; j += 2) {
            ll tmpX = x[i] + j * D;
            auto itr = lower_bound(X[tmpX].begin(), X[tmpX].end(), make_pair(y[i] - D, 0LL));
            auto itr2 = upper_bound(X[tmpX].begin(), X[tmpX].end(), make_pair(y[i] + D, INF));
            num[i] += itr2 - itr;
        }
        for(ll j = -1; j <= 1; j += 2) {
            ll tmpY = y[i] + j * D;
            auto itr = lower_bound(Y[tmpY].begin(), Y[tmpY].end(), make_pair(x[i] - D, 0LL));
            auto itr2 = upper_bound(Y[tmpY].begin(), Y[tmpY].end(), make_pair(x[i] + D, INF));
            num[i] += itr2 - itr;
        }
        if(st.find({x[i] - D, y[i] - D}) != st.end()) num[i]--;
        if(st.find({x[i] + D, y[i] - D}) != st.end()) num[i]--;
        if(st.find({x[i] - D, y[i] + D}) != st.end()) num[i]--;
        if(st.find({x[i] + D, y[i] + D}) != st.end()) num[i]--;
        //cerr << i << " " << num[i] << endl;
    }
    connected.insert(a);
    connected.insert(b);
    que.push(a);
    que.push(b);
    while(!que.empty()) {
        ll i = que.front();
        //cerr << i << endl;
        que.pop();
        for(ll j = -1; j <= 1; j += 2) {
            ll tmpX = x[i] + j * D;
            auto itr = lower_bound(X[tmpX].begin(), X[tmpX].end(), make_pair(y[i] - D, 0LL));
            while(itr != X[tmpX].end() and (*itr).first <= y[i] + D) {
                ll idx = (*itr).second;
                if(connected.find(idx) == connected.end()) {
                    connected.insert(idx);
                    que.push(idx);
                }
                itr = X[tmpX].erase(itr);
            }
            ll tmpY = y[i] + j * D;
            itr = lower_bound(Y[tmpY].begin(), Y[tmpY].end(), make_pair(x[i] - D, 0LL));
            while(itr != Y[tmpY].end() and (*itr).first <= x[i] + D) {
                ll idx = (*itr).second;
                if(connected.find(idx) == connected.end()) {
                    connected.insert(idx);
                    que.push(idx);
                }
                itr = Y[tmpY].erase(itr);
            }
        }
    }
    for(auto tmp : connected) {
        ans += num[tmp];
    }
    ans = ans / 2;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 51880