#include <bits/stdc++.h>

using namespace std;

void dfs(int node, vector<vector<int>>& adjList, vector<int>& vis)
{
  vis[node] = 1;
  for(int v : adjList[node])
  {
    if(!vis[v])
    {
      dfs(v, adjList, vis);
    }
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  a--, b--;
  vector<pair<int, int>> points(n);
  for(int i = 0; i < n; i++)
  {
    cin >> points[i].first >> points[i].second;
    points[i] = {points[i].first + points[i].second, points[i].first - points[i].second};
  }
  int k = max(abs(points[a].first - points[b].first), abs(points[a].second - points[b].second));
  vector<vector<int>> adjList(n);
  set<pair<int, int>> edges;
  vector<pair<pair<int, int>, int>> xpy(n);
  for(int i = 0; i < n; i++)
  {
    xpy[i].first = points[i];
    xpy[i].second = i;
  }
  sort(xpy.begin(), xpy.end());
  for(int i = n - 1, j = n - 1, mx = n - 1; i >= 0; i--)
  {
    for(; j >= i && ((xpy[j].first.first > xpy[i].first.first + k) || (xpy[j].first.first == xpy[i].first.first + k && xpy[j].first.second >= xpy[i].first.second - k)); j--);
    j = min(j + 1, n - 1);
    int tmp = mx;
    for(int l = j, prev = xpy[i].second; l <= mx && xpy[l].first.first == xpy[i].first.first + k && xpy[l].first.second <= xpy[i].first.second + k && xpy[l].first.second >= xpy[i].first.second - k; l++)
    {
      adjList[prev].push_back(xpy[l].second);
      adjList[xpy[l].second].push_back(prev);
      prev = xpy[l].second;
      tmp = j;
    }
    mx = tmp;
  }
  vector<pair<pair<int, int>, int>> xmy(n);
  for(int i = 0; i < n; i++)
  {
    xmy[i].first = {points[i].second, points[i].first};
    xmy[i].second = i;
  }
  sort(xmy.begin(), xmy.end());
  for(int i = n - 1, j = n - 1, mx = n - 1; i >= 0; i--)
  {
    for(; j >= i && ((xmy[j].first.first > xmy[i].first.first + k) || (xmy[j].first.first == xmy[i].first.first + k && xmy[j].first.second >= xmy[i].first.second - k)); j--);
    j = min(j + 1, n - 1);
    int tmp = mx;
    for(int l = j, prev = xmy[i].second; l <= mx && xmy[l].first.first == xmy[i].first.first + k && xmy[l].first.second <= xmy[i].first.second + k && xmy[l].first.second >= xmy[i].first.second - k; prev = xmy[l].second, l++)
    {
      adjList[prev].push_back(xmy[l].second);
      adjList[xmy[l].second].push_back(prev);
      tmp = j;
    }
    mx = tmp;
  }
  vector<int> vis(n, 0);
  dfs(a, adjList, vis);
  vector<pair<int, int>> pnt;
  for(int i = 0; i < n; i++)
  {
    if(vis[i])
    {
      pnt.push_back(points[i]);
    }
  }
  n = pnt.size();
  vector<pair<int, int>> psrt(n), msrt(n);
  for(int i = 0; i < n; i++)
  {
    psrt[i] = {pnt[i].first, -pnt[i].second};
    msrt[i] = {pnt[i].second, pnt[i].first};
  }
  sort(psrt.begin(), psrt.end());
  sort(msrt.begin(), msrt.end());
  long long ans = 0;
  for(int i = 0; i < n; i++)
  {
    long long pcount = lower_bound(psrt.begin(), psrt.end(), make_pair(pnt[i].first + k, -(pnt[i].second - k))) - lower_bound(psrt.begin(), psrt.end(), make_pair(pnt[i].first + k, -(pnt[i].second + k)));
    long long mcount = lower_bound(msrt.begin(), msrt.end(), make_pair(pnt[i].second + k, pnt[i].first + k)) - lower_bound(msrt.begin(), msrt.end(), make_pair(pnt[i].second + k, pnt[i].first - k));
    ans += pcount + mcount;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 18804