#include <bits/stdc++.h>

using namespace std;
using int64 = long long;

constexpr int DEBUG = 0;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

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

  vector<int64> xs(n);
  vector<int64> ys(n);
  vector<pair<int64, int64>> xys;
  vector<pair<int64, int64>> yxs;
  for (int i = 0; i < n; i++) {
    int64 s, t;
    cin >> s >> t;
    int64 x = s + t;
    int64 y = s - t;
    xs[i] = x;
    ys[i] = y;
    xys.push_back(make_pair(x, y));
    yxs.push_back(make_pair(y, x));
  }
  sort(xys.begin(), xys.end());
  sort(yxs.begin(), yxs.end());

  int64 d = max(abs(xs[a] - xs[b]), abs(ys[a] - ys[b]));
  if (DEBUG) cout << "d: " << d << endl;

  set<pair<int64, int64>> live_xy_set(xys.begin(), xys.end());
  set<pair<int64, int64>> live_yx_set(yxs.begin(), yxs.end());
  vector<pair<int64, int64>> visited_ps;
  function<void(int64, int64)> dfs_fn = [&](int64 x, int64 y) {
    if (DEBUG) {
      cout << "dfs_fn(" << x << ", " << y << ")" << endl;
    }
    visited_ps.push_back(make_pair(x, y));

    vector<pair<int64, int64>> ps;
    for (auto it = live_xy_set.lower_bound(make_pair(x - d, y - d));
         it != live_xy_set.upper_bound(make_pair(x - d, y + d)); it++) {
      ps.push_back(*it);
    }
    for (auto it = live_xy_set.lower_bound(make_pair(x + d, y - d));
         it != live_xy_set.upper_bound(make_pair(x + d, y + d)); it++) {
      ps.push_back(*it);
    }
    for (auto it = live_yx_set.lower_bound(make_pair(y - d, x - d + 1));
         it != live_yx_set.upper_bound(make_pair(y - d, x + d - 1)); it++) {
      ps.push_back(make_pair((*it).second, (*it).first));
    }
    for (auto it = live_yx_set.lower_bound(make_pair(y + d, x - d + 1));
         it != live_yx_set.upper_bound(make_pair(y + d, x + d - 1)); it++) {
      ps.push_back(make_pair((*it).second, (*it).first));
    }

    for (const auto& p : ps) {
      live_xy_set.erase(make_pair(p.first, p.second));
      live_yx_set.erase(make_pair(p.second, p.first));
    }

    for (const auto& p : ps) {
      if (DEBUG) {
        cout << p.first << " " << p.second << endl;
      }
    }

    for (const auto& p : ps) {
      dfs_fn(p.first, p.second);
    }
  };

  live_xy_set.erase(make_pair(xs[a], ys[a]));
  live_yx_set.erase(make_pair(ys[a], xs[a]));
  dfs_fn(xs[a], ys[a]);

  // cout << "DFS done!" << endl;

  int64 pair_count = 0;
  for (const auto& p : visited_ps) {
    int64 x = p.first;
    int64 y = p.second;
    pair_count += distance(
        lower_bound(xys.begin(), xys.end(), make_pair(x - d, y - d)),
        upper_bound(xys.begin(), xys.end(),make_pair(x - d, y + d)));
    pair_count += distance(
        lower_bound(xys.begin(), xys.end(), make_pair(x + d, y - d)),
        upper_bound(xys.begin(), xys.end(),make_pair(x + d, y + d)));
    pair_count += distance(
        lower_bound(yxs.begin(), yxs.end(), make_pair(y - d, x - d + 1)),
        upper_bound(yxs.begin(), yxs.end(),make_pair(y - d, x + d - 1)));
    pair_count += distance(
        lower_bound(yxs.begin(), yxs.end(), make_pair(y + d, x - d + 1)),
        upper_bound(yxs.begin(), yxs.end(),make_pair(y + d, x + d - 1)));
    if (DEBUG) {
      cout << x << " " << y << endl;
      cout << "pair_count: " << pair_count << endl;
    }
  }
  cout << pair_count / 2 << endl;
}

Measured memory_bytes: 29412