#include <bits/stdc++.h>

#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define debug(x) cerr << #x << ": " << x << ", "
#define debugln(x) cerr << #x << ": " << x << '\n'

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using namespace std;
using ll = long long;
using P = pair<ll, ll>;

//constexpr ll mod = 998244353;
constexpr ll mod = 1e9+7;
const double PI = acos(-1.0);
mt19937_64 engine(chrono::steady_clock::now().time_since_epoch().count());

vector<int> cnt(100005);

std::vector<int> par;
std::vector<int> rak; // number of the vertices

void init(int n) {
  par.resize(n+1);
  rak.resize(n+1, 1);
  for(int i=1; i<=n; i++) {
    par[i] = i;
  }
}

int find(int x) {
  if (par[x] == x) {
    return x;
  } else {
    return par[x] = find(par[x]);
  }
}

void unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x==y) return;
  if (rak[x] < rak[y]) {
    rak[y] += rak[x];
    par[x] = y;
  } else {
    rak[x] += rak[y];
    par[y] = x;
  }
}

bool same(int x, int y) {
  return find(x) == find(y);
}

signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  init(100005);

  int n, a, b; cin >> n >> a >> b;
  a--; b--;
  vector<P> vec(n);// x, y

  unordered_map<ll, int> mp;
  map<int, vector<int>> mp1, mp2;
  vector<P> vec2(n); // x+y, i
  vector<P> vec3(n); // x-y, i
  rep(i, n) {
    int x, y; cin >> x >> y;
    vec[i] = P(x, y);
    mp[x*mod+y] = i;
    int s = x+y;
    if (mp1.find(s) == mp1.end()) {
      vector<int> v; v.push_back(x);
      mp1[s] = v;
    } else {
      mp1[s].push_back(x);
    }
    s = x-y;
    if (mp2.find(s) == mp2.end()) {
      vector<int> v; v.push_back(x);
      mp2[s] = v;
    } else {
      mp2[s].push_back(x);
    }
  }

  ll len = abs(vec[a].first-vec[b].first) + abs(vec[a].second-vec[b].second);

  for(auto& e: mp1) {
    sort(e.second.begin(), e.second.end());
  }
  for(auto& e: mp2) {
    sort(e.second.begin(), e.second.end());
  }

  for(auto& e: mp1) {
    int s = e.first;
    if (mp1.find(s+len) == mp1.end()) continue;
    auto vec = mp1[s+len];
    int checked = INT_MIN;
    for(auto& x: e.second) {
      int pos = mp[x*mod+s-x];
      auto it1 = lower_bound(vec.begin(), vec.end(), x);
      auto it2 = upper_bound(vec.begin(), vec.end(), x+len);
      cnt[pos] += distance(it1, it2);
      it1 = lower_bound(vec.begin(), vec.end(), max(x, checked));
      for(;it1 != it2; it1++) {
        auto v = *it1;
        unite(pos, mp[v*mod+s+len-v]);
        chmax(checked, v);
      }
    }
  }

  for(auto& e: mp2) {
    int s = e.first;
    if (mp2.find(s+len) == mp2.end()) continue;
    auto vec = mp2[s+len];
    int checked = INT_MIN;
    for(auto& x: e.second) {
      int pos = mp[x*mod-(s-x)];
      auto it1 = lower_bound(vec.begin(), vec.end(), x+1);
      auto it2 = upper_bound(vec.begin(), vec.end(), x+len-1);
      cnt[pos] += distance(it1, it2);
      it1 = lower_bound(vec.begin(), vec.end(), max(x+1, checked));
      for(;it1 != it2; it1++) {
        auto v = *it1;
        unite(pos, mp[v*mod-(s+len-v)]);
        chmax(checked, v);
      }
    }
  }

  ll ans = 0;
  rep(i, n) {
    if (same(i, a)) {
      ans += cnt[i];
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 29220