#include <bits/stdc++.h>
using namespace std;
map<int, set<int>> p, q;
map<int, vector<int>> p2, q2;
map<pair<int, int>, int> r;
int x[100005], y[100005], dist;
long long ans;
bool ok[100005];
void dfs(int cur) {
  ok[cur] = true;
  p[x[cur] + y[cur]].erase(x[cur]);
  q[x[cur] - y[cur]].erase(x[cur]);
  map<int, set<int>>::iterator it1;
  set<int>::iterator it2;
  // quadrant 1 x + y + dist
  it1 = p.find(x[cur] + y[cur] + dist);
  if (it1 != p.end()) {
    set<int>& st = it1->second;
    it2 = st.lower_bound(x[cur]);
    while (it2 != st.end() && *it2 <= x[cur] + dist) {
      int id = r[{*it2, y[cur] + dist - (*it2 - x[cur])}];
      dfs(id);
      it2 = st.lower_bound(x[cur]);
    }
  }
  
  // quadrant 2 x - y - dist
  it1 = q.find(x[cur] - y[cur] - dist);
  if (it1 != q.end()) {
    set<int>& st = it1->second;
    it2 = st.lower_bound(x[cur] - dist);
    while (it2 != st.end() && *it2 <= x[cur]) {
      int id = r[{*it2, y[cur] + dist - (x[cur] - *it2)}];
      dfs(id);
      it2 = st.lower_bound(x[cur] - dist);
    }
  }
  
  // quadrant 3 x + y - dist
  it1 = p.find(x[cur] + y[cur] - dist);
  if (it1 != p.end()) {
    set<int>& st = it1->second;
    it2 = st.lower_bound(x[cur] - dist);
    while (it2 != st.end() && *it2 <= x[cur]) {
      int id = r[{*it2, y[cur] - dist + (x[cur] - *it2)}];
      dfs(id);
      it2 = st.lower_bound(x[cur] - dist);
    }
  }
  
  // quadrant 4 x - y + dist
  it1 = q.find(x[cur] - y[cur] + dist);
  if (it1 != q.end()) {
    set<int>& st = it1->second;
    it2 = st.lower_bound(x[cur]);
    while (it2 != st.end() && *it2 <= x[cur] + dist) {
      int id = r[{*it2,  y[cur] - dist + (*it2 - x[cur])}];
      dfs(id);
      it2 = st.lower_bound(x[cur]);
    }
  } 
}

void compute(int cur) {
  map<int, vector<int>>::iterator it1;
  vector<int>::iterator it2, it3;
  // quadrant 1 x + y + dist
  it1 = p2.find(x[cur] + y[cur] + dist);
  if (it1 != p2.end()) {
    vector<int>& st = it1->second;
    it2 = lower_bound(st.begin(), st.end(), x[cur]);
    it3 = lower_bound(st.begin(), st.end(), x[cur] + dist);
    ans += it3 - it2;
  }
  
  // quadrant 2 x - y - dist
  it1 = q2.find(x[cur] - y[cur] - dist);
  if (it1 != q2.end()) {
    vector<int>& st = it1->second;
    it2 = lower_bound(st.begin(), st.end(), x[cur] - dist);
    it3 = lower_bound(st.begin(), st.end(), x[cur]);
    ans += it3 - it2;
  }
  
  // quadrant 3 x + y - dist
  it1 = p2.find(x[cur] + y[cur] - dist);
  if (it1 != p2.end()) {
    vector<int>& st = it1->second;
    it2 = lower_bound(st.begin(), st.end(), x[cur] - dist);
    it3 = lower_bound(st.begin(), st.end(), x[cur]);
    ans += it3 - it2;
  }
  
  // quadrant 4 x - y + dist
  it1 = q2.find(x[cur] - y[cur] + dist);
  if (it1 != q2.end()) {
    vector<int>& st = it1->second;
    it2 = lower_bound(st.begin(), st.end(), x[cur]);
    it3 = lower_bound(st.begin(), st.end(), x[cur] + dist);
    ans += it3 - it2;
  } 
}

int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &x[i], &y[i]);
    p[x[i] + y[i]].insert(x[i]);
    q[x[i] - y[i]].insert(x[i]);
    r[{x[i], y[i]}] = i;
  }
  dist = abs(x[a] - x[b]) + abs(y[a] - y[b]);
  dfs(a);
  for (int i = 1; i <= n; i++) {
    p2[x[i] + y[i]].push_back(x[i]);
    q2[x[i] - y[i]].push_back(x[i]);
  }
  for (auto&& pmp: p2) {
    sort(pmp.second.begin(), pmp.second.end());
  }
  for (auto&& pmp: q2) {
    sort(pmp.second.begin(), pmp.second.end());
  }
  for (int i = 1; i <= n; i++) {
    if (!ok[i]) continue;
    compute(i);
  }
  printf("%lld\n", ans / 2);
  return 0;
}


Measured memory_bytes: 51584