import std.stdio;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.functional;
import std.bigint;
import std.numeric;
import std.array;
import std.math;
import std.range;
import std.container;
import std.ascii;
import std.concurrency;
void times(alias fun)(int n) {
    foreach(i; 0..n) fun();
}
auto rep(alias fun, T = typeof(fun()))(int n) {
    T[] res = new T[n];
    foreach(ref e; res) e = fun();
    return res;
}
// fold was added in D 2.071.0.
template fold(fun...) if (fun.length >= 1) {
    auto fold(R, S...)(R r, S seed) {
        static if (S.length < 2) {
            return reduce!fun(seed, r);
        } else {
            return reduce!fun(tuple(seed), r);
        }
    }
}

struct Pos{
    int index;
    long x, y;
    bool checked;
}
long dist(Pos p1, Pos p2) {
    return max(abs(p1.x-p2.x), abs(p1.y-p2.y));
}

long INF = long.max/3;
void main() {
    int N, a, b;
    readf("%d %d %d\n", &N, &a, &b);
    a--; b--;
    Pos[] ps = N.iota.map!((i) => readln.split.array.to!(long[]).pipe!(a => Pos(i, a.front+a.back, a.front-a.back))).array;
    auto rbtree1 = redBlackTree!((a, b) =>
        a.x!=b.x ? a.x<b.x : a.y<b.y
    )(ps);
    auto sl1 = rbtree1[].array;
    auto rbtree2 = redBlackTree!((a, b) =>
        a.y!=b.y ? a.y<b.y : a.x<b.x
    )(ps);
    auto sl2 = rbtree2[].array;

    long ans = 0;
    long d = dist(ps[a], ps[b]);

    ps[a].checked = true;
    ps[b].checked = true;
    auto list = DList!int([a, b]);
    auto f = (int i) {
        ans++;
        if (!ps[i].checked) {
            list.insertBack(i);
            ps[i].checked = true;
        }
    };
    while(!list.empty) {
        int t = list.front; list.removeFront;
        with(ps[t]) {
            int l1 = rbtree1.lowerBound(Pos(-1, x-d, y-d)).array.length.to!int;
            int r1 = N-rbtree1.upperBound(Pos(-1, x-d, y+d-1)).array.length.to!int;
            sl1[l1..r1].map!(p => p.index).each!f;

            int l2 = rbtree1.lowerBound(Pos(-1, x+d, y-d+1)).array.length.to!int;
            int r2 = N-rbtree1.upperBound(Pos(-1, x+d, y+d)).array.length.to!int;
            sl1[l2..r2].map!(p => p.index).each!f;

            int l3 = rbtree2.lowerBound(Pos(-1, x-d+1, y-d)).array.length.to!int;
            int r3 = N-rbtree2.upperBound(Pos(-1, x+d, y-d)).array.length.to!int;
            sl2[l3..r3].map!(p => p.index).each!f;

            int l4 = rbtree2.lowerBound(Pos(-1, x-d, y+d)).array.length.to!int;
            int r4 = N-rbtree2.upperBound(Pos(-1, x+d-1, y+d)).array.length.to!int;
            sl2[l4..r4].map!(p => p.index).each!f;
        }
    }
    ans.pipe!"a/2".writeln;
}
