#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

struct Fenwick {
  vector<set<pair<int, int>>> fw;
  vector<int> coord;

  void Insert(int x) { coord.push_back(x); }

  void Modify(int p, int y, int z) {
    p = lower_bound(coord.begin(), coord.end(), p) - coord.begin();
    for (int i = p + 1; i < fw.size(); i += i & -i) fw[i].insert(make_pair(y, z));
  }

  int Query(int p, int y) {
    p = upper_bound(coord.begin(), coord.end(), p) - coord.begin() - 1;
    for (int i = p + 1; i > 0; i -= i & -i) {
      if (!fw[i].empty() && fw[i].begin()->first <= y) return fw[i].begin()->second;
    }
    return -1;
  }

  void Remove(int x, int y, int z) {
    int p = lower_bound(coord.begin(), coord.end(), x) - coord.begin();
    for (int i = p + 1; i < fw.size(); i += i & -i) fw[i].erase(make_pair(y, z));
  }

  void Make() {
    sort(coord.begin(), coord.end());
    coord.resize(unique(coord.begin(), coord.end()) - coord.begin());
    fw.resize(coord.size() + 1);
  }
};

template <class Fenw>
void Modify(Fenw &fw, int p, int v) {
  for (int i = p + 1; i < fw.size(); i += i & -i) fw[i][v]++;
}

template <class Fenw>
int Query(Fenw &fw, int p, int v) {
  int res = 0;
  for (int i = p + 1; i > 0; i -= i & -i) {
    if (fw[i].find(v) != fw[i].end()) res += fw[i][v];
  }
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  a--, b--;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  int dist = abs(x[a] - x[b]) + abs(y[a] - y[b]);

  map<int, Fenwick> p[4];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 2; ++j) {
      for (int k = 0; k < 2; ++k) {
        p[j * 2 + k][x[i] + y[i]].Insert(x[i]);
        y[i] = -y[i];
      }
      x[i] = -x[i];
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (auto &it : p[i]) it.second.Make();
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 2; ++j) {
      for (int k = 0; k < 2; ++k) {
        p[j * 2 + k][x[i] + y[i]].Modify(x[i], y[i], i);
        y[i] = -y[i];
      }
      x[i] = -x[i];
    }
  }

  vector<bool> vis(n);
  function<void(int)> Dfs = [&](int v) {
    vis[v] = true;
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j < 2; ++j) {
        p[i * 2 + j][x[v] + y[v]].Remove(x[v], y[v], v);
        y[v] = -y[v];
      }
      x[v] = -x[v];
    }
    while (true) {
      int u = -1;
      for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
          if (u == -1) u = p[i * 2 + j][x[v] + y[v] - dist].Query(x[v], y[v]);
          y[v] = -y[v];
        }
        x[v] = -x[v];
      }
      if (u == -1) break;
      Dfs(u);
    }
  };

  Dfs(a);

  vector<int> ord(n);
  iota(ord.begin(), ord.end(), 0);
  sort(ord.begin(), ord.end(), [&](int i, int j) { return x[i] < x[j]; });
  vector<int> ds(y.begin(), y.end());
  sort(ds.begin(), ds.end());
  ds.resize(unique(ds.begin(), ds.end()) - ds.begin());

  vector<map<int, int>> pref(ds.size() + 1);
  vector<map<int, int>> suff(ds.size() + 1);

  int64_t res = 0;
  for (int i = 0; i < n; ++i) {
    if (!vis[ord[i]]) continue;
    int f = lower_bound(ds.begin(), ds.end(), y[ord[i]]) - ds.begin();
    res += Query(pref, f, x[ord[i]] + y[ord[i]] - dist);
    res += Query(suff, ds.size() - f - 2, x[ord[i]] - y[ord[i]] - dist);
    Modify(pref, f, x[ord[i]] + y[ord[i]]);
    Modify(suff, ds.size() - f - 1, x[ord[i]] - y[ord[i]]);
  }
  cout << res << "\n";
  return 0;
}


Measured memory_bytes: 201472