#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
using namespace std;


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

template<class T> vector<T> make_vec(size_t a) { return vector<T>(a); }
template<class T, class... Ts> auto make_vec(size_t a, Ts... ts) {
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
template<class T, class V>
typename enable_if<is_class<T>::value == 0>::type fill(T &t, const V &v) {
    t = v;
}
template<class T, class V>
typename enable_if<is_class<T>::value != 0>::type fill(T &t, const V &v){
    for (auto &e : t) fill(e, v);
}

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }

#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

using pint = pair<int,int>;

// 入力
int N, a, b;
vector<int> vx, vy;
map<pint,int> ptoi;

// 整理
map<int, set<int>> xy, yx;
map<int, vector<int>> vxy, vyx;
long long D, res;
vector<long long> deg;
vector<bool> seen;

void dfs(int v) {
    res += deg[v];
    seen[v] = true;
    int x = vx[v], y = vy[v];

    vector<int> nvs;
    // 右側
    {
        auto &se = xy[x + D];
        auto it = se.lower_bound(y - D);
        for (; it != se.end() && *it <= y + D; it = se.erase(it))
            nvs.push_back(ptoi[{x+D, *it}]), yx[*it].erase(x+D);
    }
    // 左側
    {
        auto &se = xy[x - D];
        auto it = se.lower_bound(y - D);
        for (; it != se.end() && *it <= y + D; it = se.erase(it))
            nvs.push_back(ptoi[{x-D, *it}]), yx[*it].erase(x-D);
    }
    // 上側
    {
        auto &se = yx[y + D];
        auto it = se.lower_bound(x - D);
        for (; it != se.end() && *it <= x + D; it = se.erase(it))
            nvs.push_back(ptoi[{*it, y+D}]), xy[*it].erase(y+D);
    }
    // 下側
    {
        auto &se = yx[y - D];
        auto it = se.lower_bound(x - D);
        for (; it != se.end() && *it <= x + D; it = se.erase(it))
            nvs.push_back(ptoi[{*it, y-D}]), xy[*it].erase(y-D);
    }
    //COUT(x); COUT(y); COUT(v); COUT(nvs);

    // 探索
    for (auto nv : nvs) if (!seen[nv]) dfs(nv);
}

long long solve() {
    D = max(abs(vx[a] - vx[b]), abs(vy[a] - vy[b]));

    // 次数を求める
    deg.assign(N, 0);
    for (int i = 0; i < N; ++i) {
        int x = vx[i], y = vy[i];
        deg[i] += upper_bound(vxy[x + D].begin(), vxy[x + D].end(), y + D)
            - lower_bound(vxy[x + D].begin(), vxy[x + D].end(), y - D);
        deg[i] += upper_bound(vxy[x - D].begin(), vxy[x - D].end(), y + D)
            - lower_bound(vxy[x - D].begin(), vxy[x - D].end(), y - D);
        deg[i] += upper_bound(vyx[y + D].begin(), vyx[y + D].end(), x + D)
            - lower_bound(vyx[y + D].begin(), vyx[y + D].end(), x - D);
        deg[i] += upper_bound(vyx[y - D].begin(), vyx[y - D].end(), x + D)
            - lower_bound(vyx[y - D].begin(), vyx[y - D].end(), x - D);

        if (ptoi.count(pint(x+D, y+D))) --deg[i];
        if (ptoi.count(pint(x+D, y-D))) --deg[i];
        if (ptoi.count(pint(x-D, y+D))) --deg[i];
        if (ptoi.count(pint(x-D, y-D))) --deg[i];
    }

    //COUT(vx); COUT(vy); COUT(deg);

    // 連結成分のみを探索
    res = 0;
    seen.assign(N, 0);
    dfs(a);
    return res/2;
}

int main() {
    while (cin >> N >> a >> b) {
        --a, --b;
        vx.resize(N); vy.resize(N); ptoi.clear();
        xy.clear(), yx.clear(), vxy.clear(), vyx.clear();
        for (int i = 0; i < N; ++i) {
            int x, y; cin >> x >> y;
            vx[i] = x + y, vy[i] = x - y;
            ptoi[pint(vx[i],vy[i])] = i;
            xy[vx[i]].insert(vy[i]);
            yx[vy[i]].insert(vx[i]);
            vxy[vx[i]].push_back(vy[i]);
            vyx[vy[i]].push_back(vx[i]);
        }
        for (auto &it : vxy) sort(it.second.begin(), it.second.end());
        for (auto &it : vyx) sort(it.second.begin(), it.second.end());
        cout << solve() << endl;
    }
}


Measured memory_bytes: 100480