/+ dub.sdl:
    name "A"
    dependency "dcomp" version=">=0.3.0"
    lflags "-stack_size" "100000000"
+/

import std.stdio, std.conv, std.algorithm, std.range;
import std.math;
import std.container.util : make;
import std.container.rbtree;

// import dcomp.scanner;
// import dcomp.algorithm;
// import dcomp.array;
// import dcomp.container.deque;

int dist(int[2] a, int[2] b) {
    return max(abs(a[0]-b[0]), abs(a[1]-b[1]));
}

bool cmpxy(int[2] a, int[2] b) {
    if (a[0] != b[0]) return a[0] < b[0];
    return a[1] < b[1];
}

bool cmpyx(int[2] a, int[2] b) {
    if (a[1] != b[1]) return a[1] < b[1];
    return a[0] < b[0];
}


int main(string[] argv) {
    auto sc = new Scanner();
    int n, a, b;
    sc.read(n, a, b); a--; b--;
    int[2][] p = new int[2][](n);
    foreach (i; 0..n) {
        int x, y;
        sc.read(x, y);
        p[i] = [x+y, x-y];
    }
    auto pmp = p.toMap;
    
    int di = dist(p[a], p[b]);

    int[] xyid = iota(n).array.sort!((a, b) => cmpxy(p[a], p[b])).array;
    int[] yxid = iota(n).array.sort!((a, b) => cmpyx(p[a], p[b])).array;

    auto que = make!(Deque!int)([a, b]);
    bool[] used = new bool[](n);

    auto xytr = iota(n).array.redBlackTree;
    auto yxtr = iota(n).array.redBlackTree;

    long ans = 0;
    void addxy(int[2] l, int [2] r) {
        int lid = binSearch!(a => !cmpxy(p[xyid[a]], l))(-1, n);
        int rid = binSearch!(a => cmpxy(r, p[xyid[a]]))(-1, n);
        ans += rid-lid;
        auto rng = xytr.upperBound(lid-1);
        auto f = FastAppender!(int[])();
        foreach (i; rng) {
            if (rid <= i) break;
            que.insertBack(xyid[i]);
            f ~= i;
        }
        xytr.removeKey(f.data);        
    }

    void addyx(int[2] l, int [2] r) {
        int lid = binSearch!(a => !cmpyx(p[yxid[a]], l))(-1, n);
        int rid = binSearch!(a => cmpyx(r, p[yxid[a]]))(-1, n);
        ans += rid-lid;
        auto rng = yxtr.upperBound(lid-1);
        auto f = FastAppender!(int[])();
        foreach (i; rng) {
            if (rid <= i) break;
            que.insertBack(yxid[i]);
            f ~= i;
        }
        yxtr.removeKey(f.data);
    }

    while (!que.empty) {
        auto nw = que.front; que.removeFront;
        if (used[nw]) continue;
        used[nw] = true;
        auto np = p[nw];
        addxy([np[0]-di, np[1]-di], [np[0]-di, np[1]+di]);
        addxy([np[0]+di, np[1]-di], [np[0]+di, np[1]+di]);
        addyx([np[0]-di, np[1]-di], [np[0]+di, np[1]-di]);
        addyx([np[0]-di, np[1]+di], [np[0]+di, np[1]+di]);
        if ([np[0]-di, np[1]-di].toStaticArray in pmp) ans--;
        if ([np[0]+di, np[1]-di].toStaticArray in pmp) ans--;
        if ([np[0]-di, np[1]+di].toStaticArray in pmp) ans--;
        if ([np[0]+di, np[1]+di].toStaticArray in pmp) ans--;
    }
    writeln(ans/2);
    return 0;
}
/* IMPORT /Users/yosupo/Program/dcomp/source/dcomp/container/deque.d */
// module dcomp.container.deque;

struct Deque(T) {
    import core.exception : RangeError;

    struct Payload {
        T[] d;
        size_t st, length;
        @property bool empty() const { return length == 0; }
        alias opDollar = length;
        ref inout(T) opIndex(size_t i) inout {
            assert(i < length);
            return d[(st+i >= d.length) ? (st+i-d.length) : st+i];
        }
        private void expand() {
            import std.algorithm : max;
            assert(length == d.length);
            T[] nd = new T[](max(4L, 2*d.length));
            foreach (i; 0..d.length) {
                nd[i] = this[i];
            }
            d = nd; st = 0;
        }
        void insertFront(T v) {
            if (length == d.length) expand();
            if (st == 0) st += d.length;
            st--; length++;
            this[0] = v; 
        }
        void insertBack(T v) {
            if (length == d.length) expand();
            length++;
            this[length-1] = v; 
        }
        void removeFront() {
            assert(!empty, "Deque.removeFront: Deque is empty");        
            st++; length--;
            if (st == d.length) st = 0;
        }
        void removeBack() {
            assert(!empty, "Deque.removeBack: Deque is empty");        
            length--;
        }        
    }
    struct RangeT(A) {
        alias T = typeof(*(A.p));
        alias E = typeof(A.p.d[0]);
        T *p;
        size_t a, b;
        @property bool empty() const { return b <= a; }
        @property size_t length() const { return b-a; }
        @property RangeT save() { return RangeT(p, a, b); }
        @property RangeT!(const A) save() const {
            return typeof(return)(p, a, b);
        }
        alias opDollar = length;
        @property ref inout(E) front() inout { return (*p)[a]; }
        @property ref inout(E) back() inout { return (*p)[b-1]; }
        void popFront() {
            version(assert) if (empty) throw new RangeError();
            a++;
        }
        void popBack() {
            version(assert) if (empty) throw new RangeError();
            b--;
        }
        ref inout(E) opIndex(size_t i) inout { return (*p)[i]; }
        RangeT opSlice() { return this.save; }
        RangeT opSlice(size_t i, size_t j) {
            version(assert) if (i > j || a + j > b) throw new RangeError();
            return typeof(return)(p, a+i, a+j);
        }
        RangeT!(const A) opSlice() const { return this.save; }
        RangeT!(const A) opSlice(size_t i, size_t j) const {
            version(assert) if (i > j || a + j > b) throw new RangeError();
            return typeof(return)(p, a+i, a+j);
        }
    }
    
    alias Range = RangeT!Deque;
    alias ConstRange = RangeT!(const Deque);
    alias ImmutableRange = RangeT!(immutable Deque);

    Payload *p = new Payload;
    this(Range)(Range r)
    if (is(ElementType!Range == T)) {
        foreach (v; r) {
            insertBack(v);
        }
    }
    @property bool empty() const { return p.empty; }
    @property size_t length() const { return p.length; }
    ref inout(T) opIndex(size_t i) inout { return (*p)[i]; }
    ref inout(T) front() inout { return (*p)[0]; }
    ref inout(T) back() inout { return (*p)[$-1]; }
    void insertFront(T v) { p.insertFront(v); }
    void insertBack(T v) { p.insertBack(v); }
    void removeFront() { p.removeFront(); }
    void removeBack() { p.removeBack(); }
    Range opSlice() { return Range(p, 0, length); }
}


unittest {
    import std.algorithm : equal;
    import std.range.primitives : isRandomAccessRange;
    Deque!int q;
    assert(isRandomAccessRange!(typeof(q[])));

    assert(equal(q[], new int[](0)));
    q.insertBack(1);
    assert(equal(q[], [1]));
    q.insertBack(2);
    assert(equal(q[], [1, 2]));
    q.insertFront(3);
    assert(q.front == 3);
    assert(equal(q[], [3, 1, 2]));
    q.removeFront;
    q.insertBack(4);
    assert(q.front == 1);
    assert(q.back == 4);
    assert(equal(q[], [1, 2, 4]));
    q.insertFront(5);
    assert(equal(q[], [5, 1, 2, 4]));
    assert(equal(q[][1..3], [1, 2]));
    const auto rng = q[];
    assert(rng.front == 5 && rng.back == 4);
    auto q2 = q;
    q2.insertBack(6);
    q2.insertFront(7);
    assert(equal(q[], q2[]));
    assert(equal(q[][][][], q[]));
    assert(q[].length == q2[].length);
}

/* IMPORT /Users/yosupo/Program/dcomp/source/dcomp/array.d */
// module dcomp.array;

// import dcomp.memory;

struct FastAppender(A, bool useMyPool = false) {
    @disable this(this); //this is not reference type(don't copy!)

    import std.algorithm : max;
    import std.range.primitives : ElementEncodingType;
    import core.stdc.string : memcpy;

    private alias T = ElementEncodingType!A;
    private T* _data;
    private size_t len, cap;

    this(T[]* arr) {
        _data = (*arr).ptr;
        len = (*arr).length;
        cap = (*arr).length;
    }
    void reserve(size_t nlen) {
        import core.memory : GC;
        if (nlen <= cap) return;

        void* nx;
        if (useMyPool) {
            nx = nowPool.malloc(nlen * T.sizeof);
        } else {
            nx = GC.malloc(nlen * T.sizeof, GC.BlkAttr.NO_SCAN | GC.BlkAttr.APPENDABLE);
        }
        cap = nlen;
        if (len) memcpy(nx, _data, len * T.sizeof);
        _data = cast(T*)(nx);
    }
    void opOpAssign(string op : "~")(T item) {
        if (len == cap) {
            reserve(max(4, cap*2));
        }
        _data[len++] = item;
    }
    void clear() {
        len = 0;
    }
    T[] data() {
        return (_data) ? _data[0..len] : null;
    }
}

T[N] toStaticArray(T, int N)(T[N] a) {return a;}
/* IMPORT /Users/yosupo/Program/dcomp/source/dcomp/memory.d */
// module dcomp.memory;

MemoryPool _nowPool;

@property void nowPool(MemoryPool newPool) {
    _nowPool = newPool;
}
@property MemoryPool nowPool() {
    return _nowPool;
}

class MemoryPool {
    import core.memory : GC;
    import std.algorithm : max;

    static immutable Allign = 16;
    GC.BlkInfo[] blks;
    size_t e, idx, pos;
    this(size_t e) {
        this.e = e;
        idx = pos = 0;
    }
    void assign(size_t sz) {
        blks ~= GC.qalloc(sz);
    }
    void* malloc(size_t sz) {   
        sz = (sz + Allign-1) / Allign * Allign;
        while (idx < blks.length && blks[idx].size < pos + sz) {
            idx++; pos = 0;
        }

        if (idx == blks.length) {
            assign(max(e, sz)); pos = 0;
        }
        pos += sz;
        assert(pos <= blks[idx].size);
        return cast(void *)(cast(byte *)(blks[idx].base) + pos - sz);
    }
    void allFree() {
        idx = pos = 0;
    }
}
/* IMPORT /Users/yosupo/Program/dcomp/source/dcomp/algorithm.d */
// module dcomp.algorithm;

//[0,0,0,...,1,1,1]で、初めて1となる場所を探す。pred(l) == 0, pred(r) == 1と仮定
T binSearch(alias pred, T)(T l, T r) {
    while (r-l > 1) {
        T md = (l+r)/2;
        if (!pred(md)) l = md;
        else r = md;
    }
    return r;
}

import std.range.primitives;

Rotator!Range rotator(Range)(Range r)
if (isForwardRange!Range && hasLength!Range) {
    return typeof(return)(r);
}

struct Rotator(Range)
if (isForwardRange!Range && hasLength!Range) {
    size_t cnt;
    Range start, now;
    this(Range r) {
        cnt = 0;
        start = r.save;
        now = r.save;
    }
    this(this) {
        start = start.save;
        now = now.save;
    }
    @property bool empty() {
        return now.empty;
    }
    @property auto front() {
        assert(!now.empty);
        import std.range : take, chain;
        return chain(now, start.take(cnt));
    }
    @property Rotator!Range save() {
        return this;
    }
    void popFront() {
        cnt++;
        now.popFront;
    }
}


E minimum(alias pred = "a < b", Range, E = ElementType!Range)(Range range, E seed)
if (isInputRange!Range && !isInfinite!Range && !is(CommonType!(ElementType!Range, E) == void)) {
    import std.functional;
    while (!range.empty) {
        if (binaryFun!pred(range.front, seed)) {
            seed = range.front;
        }
        range.popFront;
    }
    return seed;
}

ElementType!Range minimum(alias pred = "a < b", Range)(Range range)
if (isInputRange!Range && !isInfinite!Range) {
    assert(!range.empty, "range must not empty");
    auto e = range.front; range.popFront;
    return minimum!pred(range, e);
}

unittest {
    assert(minimum([2, 1, 3]) == 1);
    assert(minimum!"a > b"([2, 1, 3]) == 3);
    assert(minimum([2, 1, 3], -1) == -1);
    assert(minimum!"a > b"([2, 1, 3], 100) == 100);
}

bool[ElementType!Range] toMap(Range)(Range r) {
    import std.algorithm : each;
    bool[ElementType!Range] res;
    r.each!(a => res[a] = true);
    return res;
}
/* IMPORT /Users/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

class Scanner {
    import std.stdio : File, stdin;
    import std.conv : to;
    import std.range : front, popFront, array, ElementType;
    import std.array : split;
    import std.traits : isSomeChar, isStaticArray, isArray; 
    import std.algorithm : map;
    File f;
    this(File f = stdin) {
        this.f = f;
    }
    string[] buf;
    private bool succ() {
        while (!buf.length) {
            if (f.eof) return false;
            buf = f.readln.split;
        }
        return true;
    }
    private bool readSingle(T)(ref T x) {
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                //string or char[10] etc
                x = buf.front;
                buf.popFront;
            } else {
                static if (isStaticArray!T) {
                    //static
                    assert(buf.length == T.length);
                }
                x = buf.map!(to!E).array;
                buf.length = 0;                
            }
        } else {
            x = buf.front.to!T;
            buf.popFront;            
        }
        return true;
    }
    int read(T, Args...)(ref T x, auto ref Args args) {
        if (!readSingle(x)) return 0;
        static if (args.length == 0) {
            return 1;
        } else {
            return 1 + read(args);
        }
    }
}

unittest {
    import std.path : buildPath;
    import std.file : tempDir;
    import std.algorithm : equal;
    import std.stdio : File;
    string fileName = buildPath(tempDir, "kyuridenanmaida.txt");
    auto fout = File(fileName, "w");
    fout.writeln("1 2 3");
    fout.writeln("ab cde");
    fout.writeln("1.0 1.0 2.0");
    fout.close;
    Scanner sc = new Scanner(File(fileName, "r"));
    int a;
    int[2] b;
    char[2] c;
    string d;
    double e;
    double[] f;
    sc.read(a, b, c, d, e, f);
    assert(a == 1);
    assert(equal(b[], [2, 3]));
    assert(equal(c[], "ab"));
    assert(equal(d, "cde"));
    assert(e == 1.0);
    assert(equal(f, [1.0, 2.0]));
}


Measured memory_bytes: 16124