#include <algorithm>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
#define fst first
#define snd second

/* clang-format off */
template <class T, size_t D> struct _vec { using type = vector<typename _vec<T, D - 1>::type>; };
template <class T> struct _vec<T, 0> { using type = T; };
template <class T, size_t D> using vec = typename _vec<T, D>::type;
template <class T> vector<T> make_v(size_t size, const T& init) { return vector<T>(size, init); }
template <class... Ts> auto make_v(size_t size, Ts... rest) { return vector<decltype(make_v(rest...))>(size, make_v(rest...)); }
/* clang-format on */

struct P {
  ll x, y;
};

struct Val {
  ll val;
  int id;

  bool operator<(const Val& rhs) const {
    if (val != rhs.val) return val < rhs.val;
    return id < rhs.id;
  }
};

int main() {
#ifdef LOCAL
  ifstream cin("in.txt");
#endif
  int N, a, b;
  while (cin >> N >> a >> b) {
    --a;
    --b;
    vector<P> ps;
    for (int i = 0; i < N; i++) {
      ll x, y;
      cin >> x >> y;
      ps.push_back({x, y});
    }
    ll d = abs(ps[a].x - ps[b].x) + abs(ps[a].y - ps[b].y);
    for (auto& p : ps) {
      ll nx = p.x - p.y;
      ll ny = p.x + p.y;
      p.x = nx;
      p.y = ny;
    }
    map<ll, set<Val>> seqX, seqY;
    for (int i = 0; i < N; i++) {
      auto p = ps[i];
      seqX[p.x].insert({p.y, i});
      seqY[p.y].insert({p.x, i});
    }
    vector<int> vs;
    queue<int> q;
    auto push = [&](int i) {
      auto p = ps[i];
      seqX[p.x].erase({p.y, i});
      seqY[p.y].erase({p.x, i});
      q.push(i);
      vs.push_back(i);
    };
    auto findAdj = [&](auto& S, ll a, ll b) {
      vector<int> adj;
      for (auto it = S.lower_bound({a, -1}); it != S.end() && it->val <= b;
           it++) {
        adj.push_back(it->id);
      }
      return adj;
    };
    push(a);
    while (!q.empty()) {
      auto i = q.front();
      q.pop();
      auto p = ps[i];
      for (int i : findAdj(seqX[p.x - d], p.y - d, p.y + d)) push(i);
      for (int i : findAdj(seqX[p.x + d], p.y - d, p.y + d)) push(i);
      for (int i : findAdj(seqY[p.y - d], p.x - d, p.x + d)) push(i);
      for (int i : findAdj(seqY[p.y + d], p.x - d, p.x + d)) push(i);
    }
    map<ll, map<ll, ll>> imosX, imosY;
    for (auto& p : ps) imosX[p.x][p.y] = imosY[p.y][p.x] = 0;
    for (int i : vs) {
      auto p = ps[i];
      ++imosX[p.x - d][p.y - d];
      --imosX[p.x - d][p.y + d + 1];
      ++imosX[p.x + d][p.y - d];
      --imosX[p.x + d][p.y + d + 1];
      ++imosY[p.y - d][p.x - d + 1];
      --imosY[p.y - d][p.x + d];
      ++imosY[p.y + d][p.x - d + 1];
      --imosY[p.y + d][p.x + d];
    }
    auto imosUp = [&](auto& mat) {
      for (auto& row : mat) {
        ll acc = 0;
        for (auto& cell : row.snd) {
          acc += cell.snd;
          cell.snd = acc;
        }
      }
    };
    imosUp(imosX);
    imosUp(imosY);
    ll res = 0;
    for (auto& p : ps) res += imosX[p.x][p.y] + imosY[p.y][p.x];
    res /= 2;
    cout << res << endl;
  }
  return 0;
}


Measured memory_bytes: 135536