import std.stdio;
import std.array;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;
import std.range;
import std.random;
import std.math;
import std.container;
import std.numeric;
import std.bigint;


void main() {
  auto s = readln.split.map!(to!int);
  auto N = s[0];
  auto A = s[1]-1;
  auto B = s[2]-1;
  auto X = new int[](N);
  auto Y = new int[](N);
  int[][int] X_n;
  int[][int] Y_n;
  foreach (i; 0..N) {
    s = readln.split.map!(to!int);
    X[i] = s[0] + s[1];
    Y[i] = s[0] - s[1];
    if (X[i] in X_n)
      X_n[X[i]] ~= i;
    else
      X_n[X[i]] = [i];
    if (X[i] in X_n)
      Y_n[Y[i]] ~= i;
    else
      Y_n[Y[i]] = [i];
  }

  auto manh = max(abs(X[A]-X[B]), abs(Y[A]-Y[B]));
  auto ans = new int[](N);
  DList!int q;
  q.insert(A);
  auto used = new bool[](N);

  while (!q.empty) {
    auto n = q.front;
    q.removeFront;
    if (used[n])
      continue;
    used[n] = true;
    if (X[n]+manh in X_n)
      foreach (m; X_n[X[n]+manh]) {
        if (abs(Y[m]-Y[n]) > manh)
          continue;
        ans[n]++;
        if (!used[m])
          q.insert(m);
      }
    if (X[n]-manh in X_n)
      foreach (m; X_n[X[n]-manh]) {
        if (abs(Y[m]-Y[n]) > manh)
          continue;
        ans[n]++;
        if (!used[m])
          q.insert(m);
      }
    if (Y[n]+manh in Y_n)
      foreach (m; Y_n[Y[n]+manh]) {
        if (abs(X[m]-X[n]) > manh)
          continue;
        ans[n]++;
        if (!used[m])
          q.insert(m);
      }
    if (Y[n]-manh in Y_n)
      foreach (m; Y_n[Y[n]-manh]) {
        if (abs(X[m]-X[n]) > manh)
          continue;
        ans[n]++;
        if (!used[m])
          q.insert(m);
      }
  }
  ((ans.sum)/2).writeln;
  //ans.writeln;
}
