#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <cmath>


using namespace std;


typedef long long ll;
typedef long double ld;


const ll MOD_CONST = 1000000007ll;


ll modSum(ll a, ll b, ll MOD = MOD_CONST) {
  return ((a % MOD) + (b % MOD)) % MOD;
}


ll modSubtract(ll a, ll b, ll MOD = MOD_CONST) {
  return (((a % MOD) - (b % MOD)) + MOD + MOD) % MOD;
}


ll modProd(ll a, ll b, ll MOD = MOD_CONST) {
  return ((a % MOD) * (b % MOD)) % MOD;
}


ll getPowMod(ll x, ll e, ll MOD = MOD_CONST) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    ll tmp = getPowMod(x, e/2, MOD);
    return modProd(tmp, tmp);
  } else {
    ll tmp = getPowMod(x, e-1, MOD);
    return modProd(tmp, x);
  }
}


ll getPow(ll x, ll e) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    ll tmp = getPow(x, e/2);
    return tmp * tmp;
  } else {
    ll tmp = getPow(x, e-1);
    return tmp * x;
  }
}


ll getInverse(ll x, ll MOD = MOD_CONST) {
  return getPowMod(x, MOD-2, MOD);
}


bool isEven(ll x) {
  ll tmp = ((x % 2) + 2) % 2;
  return tmp == 0;
}


ll getSumOfDigitsInBase(ll n, ll b) {
  ll ret = 0;
  while (n > 0) {
    ret += n % b;
    n /= b;
  }
  return ret;
}


vector<int> getKMP(string &s) {
  int len = (int)s.size();
  vector<int> ret (len, 0);
  for (int i = 1 ; i < len ; i++) {
    int at = ret[i-1];
    while (at > 0 && s[i] != s[at]) {
      at = ret[at-1];
    }
    if (s[i] == s[at]) {
      at++;
    }
    ret[i] = at;
  }
  return ret;
}


string getSubstring(string &s, int from, int to) {
  int l = to-from+1;
  if (l <= 0) {
    return "";
  }
  return s.substr(from, l);
}

ll gcd(ll a, ll b, ll & x, ll & y) {
    if (a == 0) {
        x = 0;
        y = 1;
        return b;
    }
    ll x1, y1;
    ll d = gcd(b % a, a, x1, y1);
    x = y1 - (b / a) * x1;
    y = x1;
    return d;
}


pair<ll, ll> getIntersectingRange(ll a1, ll b1, ll a2, ll b2) {
  ll s = max(a1, a2);
  ll e = min(b1, b2);

  return {s, e};
}


bool isNonEmptyIntersection(ll a1, ll b1, ll a2, ll b2) {
  auto p = getIntersectingRange(a1, b1, a2, b2);
  return p.first <= p.second;
}


double getPointDistance(double x1, double y1, double x2, double y2) {
  double dx = x1-x2;
  double dy = y1-y2;
  double d = (dx * dx) + (dy * dy);
  return sqrt(d);
}














const int MAXN = 100001;


int N, a, b;
ll d;
bool visit[MAXN];
ll x[MAXN], y[MAXN];
set< pair<ll, ll> > points;
map< ll, set< pair<ll, int> > > idX, idY;
map< ll, vector<ll> > iidX, iidY;



void BFS(int starting) {

  queue<int> Q;
  Q.push(starting);

  while (!Q.empty()) {
    int at = Q.front();
    //cerr << "At = " << at << "\n";
    visit[at] = true;
    Q.pop();
    ll atX = x[at];
    ll atY = y[at];
    ll nxtX, nxtY;
    int nxt;

    nxtX = atX - d;
    for (auto it = idX[nxtX].lower_bound({atY-d, 0}); it != idX[nxtX].end() && it->first <= atY+d ;) {
      nxt = it->second;
      nxtX = x[nxt];
      nxtY = y[nxt];
      it = idX[nxtX].erase(it);
      if (!visit[nxt]) {
        Q.push(nxt);
      }
    }
    nxtX = atX + d;
    for (auto it = idX[nxtX].lower_bound({atY-d, 0}); it != idX[nxtX].end() && it->first <= atY+d ;) {
      nxt = it->second;
      nxtX = x[nxt];
      nxtY = y[nxt];
      it = idX[nxtX].erase(it);
      if (!visit[nxt]) {
        Q.push(nxt);
      }
    }
    nxtY = atY - d;
    for (auto it = idY[nxtY].lower_bound({atX-d, 0}); it != idY[nxtY].end() && it->first <= atX+d ;) {
      nxt = it->second;
      nxtX = x[nxt];
      nxtY = y[nxt];
      it = idY[nxtY].erase(it);
      if (!visit[nxt]) {
        Q.push(nxt);
      }
    }
    nxtY = atY + d;
    for (auto it = idY[nxtY].lower_bound({atX-d, 0}); it != idY[nxtY].end() && it->first <= atX+d ;) {
      nxt = it->second;
      nxtX = x[nxt];
      nxtY = y[nxt];
      it = idY[nxtY].erase(it);
      if (!visit[nxt]) {
        Q.push(nxt);
      }
    }
  }
}


void input() {
  cin >> N >> a >> b;
  ll tmpX, tmpY;
  for (int i = 1 ; i <= N ; i++) {
    cin >> tmpX >> tmpY;
    x[i] = tmpX + tmpY; 
    y[i] = tmpX - tmpY; 
    if (i != a) {
      idX[x[i]].insert({y[i], i});
      idY[y[i]].insert({x[i], i});
    }
    iidX[x[i]].push_back(y[i]);
    iidY[y[i]].push_back(x[i]);
    points.insert({x[i], y[i]});
  }
  d = max(abs(x[a]-x[b]), abs(y[a]-y[b]));
  //cerr << "D = " << d << "\n";
}


void preprocess() {
  set<ll> seenX, seenY;
  for (int i = 1 ; i <= N ; i++) {
    if (seenX.count(x[i]) == 0) {
      sort(iidX[x[i]].begin(), iidX[x[i]].end());
      seenX.insert(x[i]);
    }
    if (seenY.count(y[i]) == 0) {
      sort(iidY[y[i]].begin(), iidY[y[i]].end());
      seenY.insert(y[i]);
    }
  }
}


void solve() {
  BFS(a);
  ll ans = 0;
  for (int i = 1 ; i <= N ; i++) {
    if (!visit[i]) continue;
    //cerr << "I = " << i << "\n";
    int at = i;
    ll atX = x[at];
    ll atY = y[at];
    ll nxtX, nxtY;
    int nxt;

    nxtX = atX - d;
    if (!iidX[nxtX].empty()) {
      auto it1 = lower_bound(iidX[nxtX].begin(), iidX[nxtX].end(), atY - d);
      auto it2 = lower_bound(iidX[nxtX].begin(), iidX[nxtX].end(), atY + d + 1);
      ans += (int)(it2-it1);
    }
    //cerr << "Ans = " << ans << "\n";
    nxtX = atX + d;
    if (!iidX[nxtX].empty()) {
      auto it1 = lower_bound(iidX[nxtX].begin(), iidX[nxtX].end(), atY - d);
      auto it2 = lower_bound(iidX[nxtX].begin(), iidX[nxtX].end(), atY + d + 1);
      ans += (int)(it2-it1);
    }
    //cerr << "Ans = " << ans << "\n";
    nxtY = atY - d;
    if (!iidY[nxtY].empty()) {
      auto it1 = lower_bound(iidY[nxtY].begin(), iidY[nxtY].end(), atX - d);
      auto it2 = lower_bound(iidY[nxtY].begin(), iidY[nxtY].end(), atX + d + 1);
      ans += (int)(it2-it1);
    }
    //cerr << "Ans = " << ans << "\n";
    nxtY = atY + d;
    if (!iidY[nxtY].empty()) {
      auto it1 = lower_bound(iidY[nxtY].begin(), iidY[nxtY].end(), atX - d);
      auto it2 = lower_bound(iidY[nxtY].begin(), iidY[nxtY].end(), atX + d + 1);
      ans += (int)(it2-it1);
    }
    //cerr << "Ans = " << ans << "\n";
    nxtX = atX - d;
    nxtY = atY - d;
    if (points.count({nxtX, nxtY}) > 0) {
      ans--;
    }
    nxtX = atX - d;
    nxtY = atY + d;
    if (points.count({nxtX, nxtY}) > 0) {
      ans--;
    }
    nxtX = atX + d;
    nxtY = atY - d;
    if (points.count({nxtX, nxtY}) > 0) {
      ans--;
    }
    nxtX = atX + d;
    nxtY = atY + d;
    if (points.count({nxtX, nxtY}) > 0) {
      ans--;
    }
    //cerr << "Ans = " << ans << "\n";
  }
  cout << ans / 2;
}


int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);

  int T;
//  cin >> T;
  T = 1;

  for (int i = 0 ; i < T ; i++) {
    input();
    preprocess();
    solve();
  }

  return 0;
}


Measured memory_bytes: 89600