#include <bits/stdc++.h>
using namespace std;

#define _p(...) (void)printf(__VA_ARGS__)
#define forr(x,arr) for(auto&& x:arr)
#define _overload3(_1,_2,_3,name,...) name
#define _rep2(i,n) _rep3(i,0,n)
#define _rep3(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,_rep3,_rep2,)(__VA_ARGS__)
#define _rrep2(i,n) _rrep3(i,0,n)
#define _rrep3(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL<<(n))
#define sz(x) ((int)(x).size())
#define fst first
#define snd second
using ll=long long;using pii=pair<int,int>;
using vb=vector<bool>;using vs=vector<string>;
using vi=vector<int>;using vvi=vector<vi>;using vvvi=vector<vvi>;
using vl=vector<ll>;using vvl=vector<vl>;using vvvl=vector<vvl>;
using vd=vector<double>;using vvd=vector<vd>;using vvvd=vector<vvd>;
using vpii=vector<pii>;using vvpii=vector<vpii>;using vvvpii=vector<vvpii>;
template<typename T>T read(){T t;cin>>t;return t;}
template<class T,class U>ostream&operator<<(ostream&o,const pair<T,U>&p){o<<'('<<p.fst<<", "<<p.snd<<')';return o;}

void Main() {
  int n = read<int>();
  int a = read<int>() - 1;
  int b = read<int>() - 1;

  vi X(n), Y(n);

  rep(i, n) {
    X[i] = read<int>();
    Y[i] = read<int>();
  }

  int dist = abs(X[a] - X[b]) + abs(Y[a] - Y[b]);

  set<pii> P_yx, P_xy;

  map<pii, int> xytoi, yxtoi;

  rep(i, n) {
    int x = X[i] + Y[i];
    int y = Y[i] - X[i];
    X[i] = x;
    Y[i] = y;

    P_xy.emplace(x, y);
    P_yx.emplace(y, x);
    xytoi[{x, y}] = i;
    yxtoi[{y, x}] = i;
  }

  P_xy.erase({X[a], Y[a]});
  P_yx.erase({Y[a], X[a]});

  vpii Q_xy, Q_yx;

  {
    vb seen(n);
    queue<int> q;
    q.emplace(a);

    while (!q.empty()) {
      const int v = q.front(); q.pop();
      if (seen[v]) continue;

      int x = X[v];
      int y = Y[v];
      seen[v] = 1;

      Q_xy.emplace_back(x, y);
      Q_yx.emplace_back(y, x);

      {
        // 右
        auto be = P_xy.lower_bound(make_pair(x + dist, y - dist));
        auto en = P_xy.lower_bound(make_pair(x + dist, y + dist));
        for (auto it = be; it != en; it++) {
          q.push(xytoi[*it]);
        }
        P_xy.erase(be, en);
      }

      {
        // 左
        auto be = P_xy.lower_bound(make_pair(x - dist, y - dist));
        auto en = P_xy.lower_bound(make_pair(x - dist, y + dist));
        for (auto it = be; it != en; it++) {
          q.push(xytoi[*it]);
        }
        P_xy.erase(be, en);
      }

      {
        // 下
        auto be = P_yx.upper_bound(make_pair(y - dist, x - dist));
        auto en = P_yx.lower_bound(make_pair(y - dist, x + dist));
        for (auto it = be; it != en; it++) {
          q.push(yxtoi[*it]);
        }
        P_yx.erase(be, en);
      }

      {
        // 上
        auto be = P_yx.lower_bound(make_pair(y + dist, x - dist));
        auto en = P_yx.upper_bound(make_pair(y + dist, x + dist));
        for (auto it = be; it != en; it++) {
          q.push(yxtoi[*it]);
        }
        P_yx.erase(be, en);
      }
    }
  }

  sort(all(Q_xy));
  sort(all(Q_yx));

  ll ans = 0;

  forr(xy, Q_xy) {
    int x = xy.fst;
    int y = xy.snd;
    {
      // 右
      auto be = lower_bound(all(Q_xy), make_pair(x + dist, y - dist));
      auto en = lower_bound(all(Q_xy), make_pair(x + dist, y + dist));
      ans += en - be;
    }

    {
      // 左
      auto be = lower_bound(all(Q_xy), make_pair(x - dist, y - dist));
      auto en = lower_bound(all(Q_xy), make_pair(x - dist, y + dist));
      ans += en - be;
    }

    {
      // 下
      auto be = upper_bound(all(Q_yx), make_pair(y - dist, x - dist));
      auto en = lower_bound(all(Q_yx), make_pair(y - dist, x + dist));
      ans += en - be;
    }

    {
      // 上
      auto be = lower_bound(all(Q_yx), make_pair(y + dist, x - dist));
      auto en = upper_bound(all(Q_yx), make_pair(y + dist, x + dist));
      ans += en - be;
    }
  }

  cout << (ans/2) << endl;
}
int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }



Measured memory_bytes: 24948