#include <bits/stdc++.h>

using namespace std;

#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!(p))
#define until(p) while(!(p))

using ll = long long;
using P = std::tuple<ll,ll>;
using Pll = std::tuple<P,ll>;

const int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, -1, 1};

const ll INF = numeric_limits<ll>::max() / 2;
int N, a, b, d;
P ps[100100], qs[100100];
std::set<Pll> sx, sy;
std::vector<int> v;
bool canVisit[100100];

inline ll manhattan(const P& p1, const P& p2){
    ll x1, y1, x2, y2;
    tie(x1, y1) = p1;
    tie(x2, y2) = p2;
    ll x_diff = x1 - x2, y_diff = y1 - y2;
    return max(abs(x_diff), abs(y_diff));
}

template <typename T>
inline tuple<T, T> _reverse(const tuple<T, T>& p){
    return std::make_tuple(snd(p), fst(p));
}

inline P _transform(const P& p){
    ll x, y;
    tie(x, y) = p;
    return std::make_tuple(x + y, x - y);
}

inline tuple<set<Pll>::iterator, set<Pll>::iterator> search(ll x, ll y, set<Pll>& s){
    auto lb = s.lower_bound(std::make_tuple(std::make_tuple(x, y - d), -INF)),
        ub = s.upper_bound(std::make_tuple(std::make_tuple(x, y + d), +INF));
    
    return std::make_tuple(lb, ub);
}

int _count(ll x, ll y, ll w, vector<P>& v){
    auto lb = lower_bound(v.begin(), v.end(), std::make_tuple(x, y - w)),
        ub = upper_bound(v.begin(), v.end(), std::make_tuple(x, y + w));
    
    return ub - lb;
}

void dfs(int v);
std::stack<int> st, _st;

inline void _dfs(ll x, ll y, P (&ps)[100100], P (&qs)[100100], set<Pll>& s, set<Pll>& t){
    set<Pll>::iterator lb, ub;
    tie(lb, ub) = search(x, y, s);

    for(;lb!=ub;lb++){
        int idx;
        tie(ignore, idx) = *lb;

        _st.emplace(idx);
    }

    int n = _st.size();
    for(int i=0;i<n;++i){
        int idx = _st.top();
        _st.pop();
        st.emplace(idx);

        canVisit[idx] = true;
        s.erase(std::make_tuple(ps[idx], idx));
        t.erase(std::make_tuple(qs[idx], idx));
    }
}

void dfs(int v){
    // std::cout << "-> " << v << std::endl;
    
    ll x, y;
    tie(x, y) = ps[v];

    _dfs(x - d, y, ps, qs, sx, sy);
    _dfs(x + d, y, ps, qs, sx, sy);
    _dfs(y - d, x, qs, ps, sy, sx);
    _dfs(y + d, x, qs, ps, sy, sx);

    while(!st.empty()){
        int idx = st.top();
        st.pop();

        dfs(idx);
    }

    // std::cout << "<- " << v << std::endl;
}

int main(){
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    std::cin >> N >> a >> b;
    --a; --b;
    
    for(int i=0;i<N;++i){
        std::cin >> fst(ps[i]) >> snd(ps[i]);
        ps[i] = _transform(ps[i]);
        qs[i] = _reverse(ps[i]);

        if(i != a){
            sx.emplace(ps[i], i);
            sy.emplace(qs[i], i);
        }
    }

    d = manhattan(ps[a], ps[b]);
    canVisit[a] = true;
    dfs(a);
    
    std::vector<P> vx, vy;
    for(int i=0;i<N;++i){
        if(canVisit[i]){
            vx.emplace_back(ps[i]);
            vy.emplace_back(qs[i]);
        }
    }

    sort(vx.begin(), vx.end());
    sort(vy.begin(), vy.end());

    ll res = 0;

    for(const auto& p : vx){
        ll x, y;
        tie(x, y) = p;
        
        res += _count(x - d, y, d, vx);
        res += _count(x + d, y, d, vx);
        res += _count(y - d, x, d - 1, vy);
        res += _count(y + d, x, d - 1, vy);
    }        
    res /= 2;

    std::cout << res << std::endl;
}


Measured memory_bytes: 30080