#include <bits/stdc++.h>
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define sz(a) (int)a.size()
#define mp(a, b) make_pair(a, b)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;

const int MAXN = 100500;
const ll INF = 1e13;
map <ll, vector<ll> > vec_sum, vec_dif;
map <ll, set<pair<ll, ll> > > sum, dif;
vector <pair <ll, ll> > coord;
int n, a, b;
ll dist;
ll res;
vector <pair <ll, ll> > good_point;
queue <pair<ll, ll> > q;

void lol(ll left, ll right, set <pair <ll, ll> > &ptr)
{
//  cout << left << ' ' << right << '\n';
  vector <pair <ll, ll> > cur;

  for (set <pair<ll, ll> >::iterator it = ptr.lower_bound(mp(left, -INF)); it != ptr.end() && *it <= make_pair(right, INF); it++)
  {
//    cout << it->first << ' ' << it->second << '\n';
    q.push(*it);
    good_point.push_back(*it);
    cur.push_back(*it);
  }
//  cout << '\n';
/*
  for (set <pair<ll, ll> >::iterator it = ptr.lower_bound(mp(left, -INF)); it != ptr.end() && *it <= make_pair(right, INF); it++)
  {
    ptr.erase(it);
  }
*/

  forn(i, sz(cur))
    ptr.erase(cur[i]);
}

void bfs(int v)
{
  q.push(mp(coord[v].first, coord[v].second));
  good_point.push_back(mp(coord[v].first, coord[v].second));

  while(!q.empty())
  {
    ll x = q.front().first;
    ll y = q.front().second;
    q.pop();
  //  cout << x << ' ' << y << ":\n";
    lol(x, x + dist, sum[x + y + dist]);
    lol(x - dist, x, sum[x + y - dist]);
    lol(x - dist, x, dif[x - y - dist]);
    lol(x, x + dist, dif[x - y + dist]);
  }
}

int main()
{
  cin >> n >> a >> b;
  coord.resize(n);
  a--, b--;
  forn(i, n)
  {
    ll x, y;
    cin >> x >> y;
    coord[i].first = x;
    coord[i].second = y;
    sum[x + y].insert(mp(x, y));
    dif[x - y].insert(mp(x, y));
  }

  dist = abs(coord[a].first - coord[b].first) + abs(coord[a].second - coord[b].second);
  bfs(a);

  sort(all(good_point));
  good_point.resize(unique(all(good_point)) - good_point.begin());
  /*forn(i, sz(good_point))
    cout << good_point[i].first << ' ' << good_point[i].second << '\n';
*/


  forn(i, sz(good_point))
  {
    ll x = good_point[i].first;
    ll y = good_point[i].second;
    vec_sum[x + y].push_back(x);
    vec_dif[x - y].push_back(x);
  }

  for(map<ll, vector <ll> >::iterator it = vec_dif.begin(); it != vec_dif.end(); it++)
    sort(all(it->second));
  for(map<ll, vector <ll> >::iterator it = vec_sum.begin(); it != vec_sum.end(); it++)
    sort(all(it->second));

  forn(i, sz(good_point))
  {
    /*
    lol(x, x + dist, sum[x + y + dist]);
    lol(x - dist, x, sum[x + y - dist]);
    lol(x - dist, x, dif[x - y - dist]);
    lol(x, x + dist, dif[x - y + dist]);
    */
    ll x = good_point[i].first;
    ll y = good_point[i].second;
    /*
    ll r1 = upper_bound(all(vec_sum[x + y + dist]), x + dist) - lower_bound(all(vec_sum[x + y + dist]), x);
    ll r2 = upper_bound(all(vec_sum[x + y - dist]), x) - lower_bound(all(vec_sum[x + y - dist]), x - dist);
    ll r3 = upper_bound(all(vec_dif[x - y - dist]), x) - lower_bound(all(vec_dif[x - y - dist]), x - dist);
    ll r4 = upper_bound(all(vec_dif[x - y + dist]), x + dist) - lower_bound(all(vec_dif[x - y + dist]), x);
*/

    ll r1 = lower_bound(all(vec_sum[x + y + dist]), x + dist) - lower_bound(all(vec_sum[x + y + dist]), x);
    ll r2 = upper_bound(all(vec_sum[x + y - dist]), x) - upper_bound(all(vec_sum[x + y - dist]), x - dist);
    ll r3 = lower_bound(all(vec_dif[x - y - dist]), x) - lower_bound(all(vec_dif[x - y - dist]), x - dist);
    ll r4 = upper_bound(all(vec_dif[x - y + dist]), x + dist) - upper_bound(all(vec_dif[x - y + dist]), x);
  //  cout << r1 << '\n' << r2 << '\n' << r3 << '\n' << r4 << "\n\n";
    res += r1 + r2 + r3 + r4;
  }

  cout << res / 2;
  return 0;
}


Measured memory_bytes: 80364