#include <bits/stdc++.h>
#define SZ(x) ((int) (x).size())
using namespace std;

typedef long long i64;

struct Point {
    int64_t x, y;
    int pos;
    Point() = default;
    Point(int _x, int _y, int _pos = -1):
        x(_x), y(_y), pos(_pos) {}
    bool operator<(const Point& other) const {
        return x < other.x || (x == other.x && y < other.y);
    }
};

vector<bool> used;
multiset<pair<int64_t, Point>> diag1, diag2;

int64_t getDist(const Point& a, const Point& b) {
    return abs(a.x - b.x) + abs(a.y - b.y);
}

void bfs(Point p, int64_t dist) {
    queue<Point> q;
    q.push(p);
    used[p.pos] = true;
    while (!q.empty()) {
        p = q.front();
        q.pop();

        auto it = diag1.lower_bound(make_pair(p.x - p.y + dist, Point(p.x, 0)));
        while (it != diag1.end() && getDist(p, it->second) == dist) {
            if (!used[it->second.pos]) {
                q.push(it->second);
                used[it->second.pos] = true;
            }
            auto it1 = it;
            ++it;
            diag1.erase(it1);
        }
        it = diag1.lower_bound(make_pair(p.x - p.y - dist, Point(p.x - dist, 0)));
        while (it != diag1.end() && getDist(p, it->second) == dist) {
            if (!used[it->second.pos]) {
                q.push(it->second);
                used[it->second.pos] = true;
            }
            auto it1 = it;
            ++it;
            diag1.erase(it1);
        }
        it = diag2.lower_bound(make_pair(p.x + p.y + dist, Point(p.x, 0)));
        while (it != diag2.end() && getDist(p, it->second) == dist) {
            if (!used[it->second.pos]) {
                q.push(it->second);
                used[it->second.pos] = true;
            }
            auto it1 = it;
            ++it;
            diag2.erase(it1);
        }
        it = diag2.lower_bound(make_pair(p.x + p.y - dist, Point(p.x - dist, 0)));
        while (it != diag2.end() && getDist(p, it->second) == dist) {
            if (!used[it->second.pos]) {
                q.push(it->second);
                used[it->second.pos] = true;
            }
            auto it1 = it;
            ++it;
            diag2.erase(it1);
        }
    }
}

int main() {
    #ifdef LOCAL_RUN
    freopen("task.in", "r", stdin);
    freopen("task.out", "w", stdout);
    //freopen("task.err", "w", stderr);
    #endif // ONLINE_JUDGE
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n, a, b;
    cin >> n >> a >> b;
    a--; b--;

    vector<Point> points;
    vector<pair<int64_t, Point>> sdiag1, sdiag2;
    for (int i = 0; i < n; ++i) {
        int64_t x, y;
        cin >> x >> y;
        Point p = Point(x, y, i);
        diag1.insert(make_pair(x - y, p));
        diag2.insert(make_pair(x + y, p));
        sdiag1.push_back(make_pair(x - y, p));
        sdiag2.push_back(make_pair(x + y, p));
        points.push_back(p);
    }
    
    int64_t dist = getDist(points[a], points[b]);
    sort(sdiag1.begin(), sdiag1.end());
    sort(sdiag2.begin(), sdiag2.end());
    used = vector<bool>(n, false);
    bfs(points[a], dist);

    int64_t ans = 0;
    for (const Point& p: points) {
        int64_t x = p.x;
        int64_t y = p.y;
        if (used[p.pos]) {
            ans += lower_bound(sdiag1.begin(), sdiag1.end(), make_pair(x - y + dist, Point(x + dist + 1, 0)))
                - lower_bound(sdiag1.begin(), sdiag1.end(), make_pair(x - y + dist, Point(x, 0)));
            ans += lower_bound(sdiag1.begin(), sdiag1.end(), make_pair(x - y - dist, Point(x + 1, 0)))
                - lower_bound(sdiag1.begin(), sdiag1.end(), make_pair(x - y - dist, Point(x - dist, 0)));
            ans += lower_bound(sdiag2.begin(), sdiag2.end(), make_pair(x + y + dist, Point(x + dist, 0)))
                - lower_bound(sdiag2.begin(), sdiag2.end(), make_pair(x + y + dist, Point(x + 1, 0)));
            ans += lower_bound(sdiag2.begin(), sdiag2.end(), make_pair(x + y - dist, Point(x, 0)))
                - lower_bound(sdiag2.begin(), sdiag2.end(), make_pair(x + y - dist, Point(x - dist + 1, 0)));
        }
    }
    ans /= 2;

    cout << ans << '\n';
}

Measured memory_bytes: 26248