#include <bits/stdc++.h>
#define err(args...) {}
#ifdef DEBUG
#include "_debug.cpp"
#endif
using namespace std;
using ll = long long;
using ld = long double;
template <typename T> using lim = numeric_limits<T>;
template <typename T> istream& operator>>(istream& is, vector<T>& a) { for(T& x : a) { is >> x; } return is; }
template <typename Iter, typename T> int gt(Iter L, Iter R, T v) { return upper_bound(L, R, v) - L; }
template <typename Iter, typename T> int ge(Iter L, Iter R, T v) { return lower_bound(L, R, v) - L; }
template <typename Iter, typename T> int lt(Iter L, Iter R, T v) { return lower_bound(L, R, v) - L - 1; }
template <typename Iter, typename T> int le(Iter L, Iter R, T v) { return upper_bound(L, R, v) - L - 1; }
template <typename Bst, typename T> typename Bst::const_iterator gt(const Bst& bst, T v) { return bst.upper_bound(v); }
template <typename Bst, typename T> typename Bst::const_iterator ge(const Bst& bst, T v) { return bst.lower_bound(v); }
template <typename Bst, typename T> typename Bst::const_iterator lt(const Bst& bst, T v) { return bst.lower_bound(v) == bst.begin() ? bst.end() : --bst.lower_bound(v); }
template <typename Bst, typename T> typename Bst::const_iterator le(const Bst& bst, T v) { return bst.upper_bound(v) == bst.begin() ? bst.end() : --bst.upper_bound(v); }
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, a, b;
    cin >> n >> a >> b;
    vector<ll> x(n + 1), y(n + 1);
    map<ll, vector<ll>> diag1, diag2;
    map<ll, map<ll, int>> diagset1, diagset2;
    for(int i = 1; i <= n; i++) {
        cin >> x[i] >> y[i];
        diag1[x[i] + y[i]].push_back(y[i]);
        diag2[x[i] - y[i]].push_back(y[i]);
        if(i != a) {
            diagset1[x[i] + y[i]][y[i]] = i;
            diagset2[x[i] - y[i]][y[i]] = i;
        }
    }
    for(auto& p : diag1) sort(p.second.begin(), p.second.end());
    for(auto& p : diag2) sort(p.second.begin(), p.second.end());
    ll d = abs(x[a] - x[b]) + abs(y[a] - y[b]);
    vector<int> ans(n + 1);
    function<void(int)> dfs = [&](int u) {
        auto& v1 = diag1[x[u] + y[u] + d];
        auto& v2 = diag1[x[u] + y[u] - d];
        auto& v3 = diag2[x[u] - y[u] + d];
        auto& v4 = diag2[x[u] - y[u] - d];
        ans[u] += max(0, lt(v1.begin(), v1.end(), y[u] + d) - ge(v1.begin(), v1.end(), y[u]) + 1);
        ans[u] += max(0, le(v2.begin(), v2.end(), y[u]) - gt(v2.begin(), v2.end(), y[u] - d) + 1);
        ans[u] += max(0, lt(v3.begin(), v3.end(), y[u]) - ge(v3.begin(), v3.end(), y[u] - d) + 1);
        ans[u] += max(0, le(v4.begin(), v4.end(), y[u] + d) - gt(v4.begin(), v4.end(), y[u]) + 1);
        auto& s1 = diagset1[x[u] + y[u] + d];
        auto& s2 = diagset1[x[u] + y[u] - d];
        auto& s3 = diagset2[x[u] - y[u] + d];
        auto& s4 = diagset2[x[u] - y[u] - d];
        vector<int> to_vis;
        for(auto it = ge(s1, y[u]); it != ge(s1, y[u] + d); it++) to_vis.push_back(it->second);
        for(auto it = gt(s2, y[u] - d); it != gt(s2, y[u]); it++) to_vis.push_back(it->second);
        for(auto it = ge(s3, y[u] - d); it != ge(s3, y[u]); it++) to_vis.push_back(it->second);
        for(auto it = gt(s4, y[u]); it != gt(s4, y[u] + d); it++) to_vis.push_back(it->second);
        for(int v : to_vis) {
            diagset1[x[v] + y[v]].erase(y[v]);
            diagset2[x[v] - y[v]].erase(y[v]);
        }
        for(int v : to_vis) {
            dfs(v);
        }
    };
    dfs(a);
    cout << accumulate(ans.begin(), ans.end(), 0ll) / 2 << endl;
    return 0;
}


Measured memory_bytes: 93568