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]));
  bool[Tuple!(int, int)] pairs;
  auto stack = new int[](N*100);
  auto p = 0;
  stack[0] = A;
  auto used = new bool[](N);
  while (p >= 0) {
    auto n = stack[p];
    p--;
    if (used[n])
      continue;
    used[n] = true;

    foreach (d; [manh, -manh])
      if (X[n]+d in X_n) {
        foreach (m; X_n[X[n]+d]) {
          if (abs(Y[m]-Y[n]) > manh)
            continue;
          if (!used[m])
            stack[++p] = m;
          auto t = tuple(min(n, m), max(n, m));
          if (!(t in pairs))
            pairs[t] = true;
        }
      }
    foreach (d; [manh, -manh])
      if (Y[n]+d in Y_n) {
        foreach (m; Y_n[Y[n]+d]) {
          if (abs(X[m]-X[n]) > manh)
            continue;
          if (!used[m])
            stack[++p] = m;
          auto t = tuple(min(n, m), max(n, m));
          if (!(t in pairs))
            pairs[t] = true;
        }
      }
  }
  pairs.keys.length.writeln;
  //pairs.writeln;
}
