// includes {{{
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<random>
#include<cassert>
// #include<deque>
// #include<multiset>
// #include<bitset>
// #include<cstring>
// #include<bits/stdc++.h>
// }}}
using namespace std;
using ll = long long;

const int N = 1e5;
ll x[N], y[N];

int used[N];

// 数え上げ用
map<ll, set<pair<ll, int>>> x2yC;
map<ll, set<pair<ll, int>>> y2xC;
// 遷移用
map<ll, set<pair<ll, int>>> x2y;
map<ll, set<pair<ll, int>>> y2x;

ll d;

template<class S, class T, class U>
void update(S &x2y, T &y, U &v, ll val, int i) {
  auto &s = x2y[val];
  auto fir = s.lower_bound(make_pair(y[i] - d, 0));
  auto las = fir;
  while(las != s.end() && las->first <= y[i] + d) {
    if(used[las->second] == 0) v.emplace_back(las->second);
    used[las->second] = 1;
    ++las;
  }
  s.erase(fir, las);
}

const ll linf = 1e18;
const int inf = 1e9;

template<class S, class T>
void mycopy(S &x2y, T &x2yC) {
  for(auto &p : x2y) {
    auto &s = x2yC[p.first];
    int i = 0;
    for(auto &e : p.second) {
      s.emplace(e.first, i++);
    }
    s.emplace(linf, i);
  }
}

template<class S, class T>
inline int cnt(S &x2yC, T &y, ll val, int i) {
  auto &s = x2yC[val];
  return s.upper_bound(make_pair(y[i] + d, inf))->second - s.lower_bound(make_pair(y[i] - d, 0))->second;
}

set<pair<ll, ll>> pts;

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

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

  for(int i = 0; i < n; i++) {
    int u, v;
    cin >> u >> v;
    x[i] = u + v;
    y[i] = u - v;
    x2y[x[i]].emplace(y[i], i);
    y2x[y[i]].emplace(x[i], i);
    pts.emplace(x[i], y[i]);
  }

  mycopy(x2y, x2yC);
  mycopy(y2x, y2xC);

  d = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
  vector<int> v;
  v.emplace_back(a);
  v.emplace_back(b);
  used[a] = used[b] = 1;

  ll ans = 0;

  while(v.size()) {
    int i = v.back();
    v.pop_back();
    update(x2y, y, v, x[i] + d, i);
    update(x2y, y, v, x[i] - d, i);
    update(y2x, x, v, y[i] + d, i);
    update(y2x, x, v, y[i] - d, i);
    ans += cnt(x2yC, y, x[i] + d, i);
    ans += cnt(x2yC, y, x[i] - d, i);
    ans += cnt(y2xC, x, y[i] + d, i);
    ans += cnt(y2xC, x, y[i] - d, i);
    for(int j = -d; j <= d; j += d * 2) for(int k = -d; k <= d; k += d * 2)
    ans -= pts.count(make_pair(x[i] + j, y[i] + k));
  }

  assert(ans % 2 == 0);
  cout << ans / 2 << endl;
  return 0;
}
