/+ dub.sdl:
    name "A"
    dependency "dcomp" version=">=0.7.4"
+/
 
import std.stdio, std.conv, std.algorithm, std.range;
import std.math;
import std.container.util : make;
import std.container.rbtree;

// import dcomp.foundation; 
// import dcomp.scanner;
// import dcomp.algorithm;
// import dcomp.container.stackpayload;
// import dcomp.container.deque;
// import dcomp.datastructure.fastset;
 
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(stdin);
    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.dup.sort!cmpxy;
//    bool[int[2]] pmp;
//    p.each!(x => pmp[x] = true);
    
    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;
    auto xytr = FastSet(n);
    auto yxtr = FastSet(n);
    foreach (i; 0..n) {
        xytr.insert(i);
        yxtr.insert(i);
    }
    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 = StackPayload!(int)();
        foreach (i; rng) {
            if (rid <= i) break;
            que.insertBack(xyid[i]);
            f ~= i.to!int;
        }
        foreach (d; f.data) xytr.remove(d);
    }
 
    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 = StackPayload!(int)();
        foreach (i; rng) {
            if (rid <= i) break;
            que.insertBack(yxid[i]);
            f ~= i.to!int;
        }
        foreach (d; f.data) yxtr.remove(d);
    }
 
    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 (pmp.contains([np[0]-di, np[1]-di].fixed)) ans--;
        if (pmp.contains([np[0]+di, np[1]-di].fixed)) ans--;
        if (pmp.contains([np[0]-di, np[1]+di].fixed)) ans--;
        if (pmp.contains([np[0]+di, np[1]+di].fixed)) ans--;
//        if ([np[0]+di, np[1]-di].fixed in pmp) ans--;
//        if ([np[0]-di, np[1]+di].fixed in pmp) ans--;
//        if ([np[0]+di, np[1]+di].fixed in pmp) ans--;
    }
    writeln(ans/2);
    return 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/container/stackpayload.d */
// module dcomp.container.stackpayload;

 
struct StackPayload(T, size_t MINCAP = 4) if (MINCAP >= 1) {
    import core.exception : RangeError;

    private T* _data;
    private uint len, cap;

    @property bool empty() const { return len == 0; }
    @property size_t length() const { return len; }
    alias opDollar = length;

     
    inout(T)[] data() inout { return (_data) ? _data[0..len] : null; }
    
    ref inout(T) opIndex(size_t i) inout {
        version(assert) if (len <= i) throw new RangeError();
        return _data[i];
    }  
    ref inout(T) front() inout { return this[0]; }  
    ref inout(T) back() inout { return this[$-1]; }  

    void reserve(size_t newCap) {
        import core.memory : GC;
        import core.stdc.string : memcpy;
        import std.conv : to;
        if (newCap <= cap) return;
        void* newData = GC.malloc(newCap * T.sizeof);
        cap = newCap.to!uint;
        if (len) memcpy(newData, _data, len * T.sizeof);
        _data = cast(T*)(newData);
    }  
    void free() {
        import core.memory : GC;
        GC.free(_data);
    }  
     
    void clear() {
        len = 0;
    }

    void insertBack(T item) {
        import std.algorithm : max;
        if (len == cap) reserve(max(cap * 2, MINCAP));
        _data[len++] = item;
    }  
    alias opOpAssign(string op : "~") = insertBack;  
    void removeBack() {
        assert(!empty, "StackPayload.removeBack: Stack is empty");
        len--;
    }  
}

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/algorithm.d */
// module dcomp.algorithm;

import std.traits : isFloatingPoint, isIntegral;

 
T binSearch(alias pred, T)(T l, T r) if (isIntegral!T) {
    while (r-l > 1) {
        T md = l + (r-l) / 2;
        if (!pred(md)) l = md;
        else r = md;
    }
    return r;
}

 
T binSearch(alias pred, T)(T l, T r, int cnt = 60) if (isFloatingPoint!T) {
    foreach (i; 0..cnt) {
        T md = (l+r)/2;
        if (!pred(md)) l = md;
        else r = md;
    }
    return r;
}

 
 

import std.range.primitives;

 
E minimum(alias pred = "a < b", Range, E = ElementType!Range)(Range range, E seed)
if (isInputRange!Range && !isInfinite!Range) {
    import std.algorithm, std.functional;
    return reduce!((a, b) => binaryFun!pred(a, b) ? a : b)(seed, range);
}

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

 
 

 
E maximum(alias pred = "a < b", Range, E = ElementType!Range)(Range range, E seed)
if (isInputRange!Range && !isInfinite!Range) {
    import std.algorithm, std.functional;
    return reduce!((a, b) => binaryFun!pred(a, b) ? b : a)(seed, range);
}

 
ElementType!Range maximum(alias pred = "a < b", Range)(Range range) {
    assert(!range.empty, "maximum: range must not empty");
    auto e = range.front; range.popFront;
    return maximum!pred(range, e);
}

 
 

 
Rotator!Range rotator(Range)(Range r) {
    return Rotator!Range(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() const {
        return now.empty;
    }
    @property auto front() const {
        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;
    }
}

 
 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/container/deque.d */
// module dcomp.container.deque;

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

    private T* _data;
    private uint start, len, cap;

    @property bool empty() const { return len == 0; }
    @property size_t length() const { return len; }
    alias opDollar = length;

    ref inout(T) opIndex(size_t i) inout {
        version(assert) if (len <= i) throw new RangeError();
        if (start + i < cap) return _data[start + i];
        else return _data[start + i - cap];
    }
    ref inout(T) front() inout { return this[0]; }
    ref inout(T) back() inout { return this[$-1]; }

    void reserve(size_t newCap) {
        import core.memory : GC;
        import std.algorithm : max;
        import std.conv : to;
        if (newCap <= cap) return;
        T* newData = cast(T*)GC.malloc(newCap * T.sizeof);
        foreach (i; 0..length) {
            newData[i] = this[i];
        }
        _data = newData; start = 0; cap = newCap.to!uint;
    }
    void clear() {
        start = len = 0;
    }
    import std.algorithm : max;
    void insertFront(T item) {
        if (len == cap) reserve(max(cap * 2, 4));
        if (start == 0) start += cap;
        start--; len++;
        this[0] = item;
    }
    void insertBack(T item) {
        if (len == cap) reserve(max(cap * 2, 4));
        len++;
        this[len-1] = item;
    }
    void removeFront() {
        assert(!empty, "Deque.removeFront: Deque is empty");
        start++; len--;
        if (start == cap) start = 0;
    }
    void removeBack() {
        assert(!empty, "Deque.removeBack: Deque is empty");        
        len--;
    }
}

 
struct Deque(T, bool mayNull = true) {
    import core.exception : RangeError;
    import std.range : ElementType, isInputRange;
    import std.traits : isImplicitlyConvertible;

    alias Payload = DequePayload!T;
    Payload* _p;
    
    static if (!mayNull) @disable this();

     
    this(U)(U[] values...) if (isImplicitlyConvertible!(U, T)) {
        _p = new Payload();
        foreach (v; values) {
            insertBack(v);
        }
    }
     
    this(Range)(Range r)
    if (isInputRange!Range &&
    isImplicitlyConvertible!(ElementType!Range, T) &&
    !is(Range == T[])) {
        _p = new Payload();
        foreach (v; r) {
            insertBack(v);
        }
    }
    private this(Payload* p) { _p = p; }
    static Deque make() { return Deque(new Payload()); }
    
    private bool havePayload() const { return (!mayNull || _p); }    
    @property bool empty() const { return (!havePayload || _p.empty); }  
    @property size_t length() const { return (havePayload ? _p.length : 0); }  
    alias opDollar = length;  

    ref inout(T) opIndex(size_t i) inout {
        assert(!empty, "Deque.opIndex: Deque is empty");
        return (*_p)[i];
    }  
    ref inout(T) front() inout { return this[0]; }  
    ref inout(T) back() inout { return this[$-1]; }  

    void clear() { if (_p) _p.clear(); }  

     
    void insertFront(T item) {
        if (mayNull && !_p) _p = new Payload();
        _p.insertFront(item);
    }
    void insertBack(T item) {
        if (mayNull && !_p) _p = new Payload();
        _p.insertBack(item);
    }  
    alias opOpAssign(string op : "~") = insertBack;  
    alias stableInsertBack = insertBack;  

     
    void removeFront() {
        assert(!mayNull || _p, "Deque.removeFront: Deque is empty");
        _p.removeFront();
    }
    void removeBack() {
        assert(!mayNull || _p, "Deque.removeBack: Deque is empty");
        _p.removeBack();
    }  
    alias stableRemoveBack = removeBack;  

     
    alias Range = RangeT!(DequePayload!T);
    alias ConstRange = RangeT!(const DequePayload!T);  
    alias ImmutableRange = RangeT!(immutable DequePayload!T);  

    size_t[2] opSlice(size_t dim : 0)(size_t start, size_t end) const {
        assert(start <= end && end <= length);
        return [start, end];
    }  
    Range opIndex(size_t[2] rng) { return Range(_p, rng[0], rng[1]); }  
    ConstRange opIndex(size_t[2] rng) const { return ConstRange(_p, rng[0], rng[1]); }  
    ImmutableRange opIndex(size_t[2] rng) immutable { return ImmutableRange(_p, rng[0], rng[1]); }  
    auto opIndex() inout { return this[0..$]; }  

    static struct RangeT(QualifiedPayload) {
        alias A = QualifiedPayload;
        import std.traits : CopyTypeQualifiers;
        alias E = CopyTypeQualifiers!(A, T);
        A *p;
        size_t l, r;

        @property bool empty() const { return r <= l; }
        @property size_t length() const { return r - l; }
        alias opDollar = length;

        @property auto save() { return this; }
        
        ref inout(E) opIndex(size_t i) inout {
            version(assert) if (empty) throw new RangeError();
            return (*p)[l+i];
        }
        @property ref inout(E) front() inout { return this[0]; }
        @property ref inout(E) back() inout { return this[$-1]; }

        void popFront() {
            version(assert) if (empty) throw new RangeError();
            l++;
        }
        void popBack() {
            version(assert) if (empty) throw new RangeError();
            r--;
        }
        
        size_t[2] opSlice(size_t dim : 0)(size_t start, size_t end) const {
            assert(start <= end && end <= length);
            return [start, end];
        }
        auto opIndex(size_t[2] rng) { return RangeT(p, l+rng[0], l+rng[1]); }
        auto opIndex(size_t[2] rng) const { return RangeT!(const A)(p, l+rng[0], l+rng[1]); }
        auto opIndex(size_t[2] rng) immutable { return RangeT!(immutable A)(p, l+rng[0], l+rng[1]); }
        auto opIndex() inout { return this[0..$]; }
    } 
}

 
 

 

 

 

 

 

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

// import dcomp.container.stackpayload;

 
class Scanner {
    import std.stdio : File;
    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) {
        this.f = f;
    }
    char[512] lineBuf;
    char[] line;
    private bool succW() {
        import std.range.primitives : empty, front, popFront;
        import std.ascii : isWhite;
        while (!line.empty && line.front.isWhite) {
            line.popFront;
        }
        return !line.empty;
    }
    private bool succ() {
        import std.range.primitives : empty, front, popFront;
        import std.ascii : isWhite;
        while (true) {
            while (!line.empty && line.front.isWhite) {
                line.popFront;
            }
            if (!line.empty) break;
            line = lineBuf[];
            f.readln(line);
            if (!line.length) return false;
        }
        return true;
    }

    private bool readSingle(T)(ref T x) {
        import std.algorithm : findSplitBefore;
        import std.string : strip;
        import std.conv : parse;
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                 
                 
                auto r = line.findSplitBefore(" ");
                x = r[0].strip.dup;
                line = r[1];
            } else static if (isStaticArray!T) {
                foreach (i; 0..T.length) {
                    bool f = succW();
                    assert(f);
                    x[i] = line.parse!E;
                }
            } else {
                StackPayload!E buf;
                while (succW()) {
                    buf ~= line.parse!E;
                }
                x = buf.data;
            }
        } else {
            x = line.parse!T;
        }
        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);
        }
    }
}


 
 

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/foundation.d */
// module dcomp.foundation;

 
static if (__VERSION__ <= 2070) {
    /*
    Copied by https://github.com/dlang/phobos/blob/master/std/algorithm/iteration.d
    Copyright: Andrei Alexandrescu 2008-.
    License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
    */
    template fold(fun...) if (fun.length >= 1) {
        auto fold(R, S...)(R r, S seed) {
            import std.algorithm : reduce;
            static if (S.length < 2) {
                return reduce!fun(seed, r);
            } else {
                import std.typecons : tuple;
                return reduce!fun(tuple(seed), r);
            }
        }
    }
     
}



 
T[N] fixed(T, size_t N)(T[N] a) {return a;}

 
 

/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/datastructure/fastset.d */
// module dcomp.datastructure.fastset;

 
struct FastSet {
    import std.range : back;
    import core.bitop : bsr, bsf;
    private size_t n, len;
    ulong[][] seg;
     
    this(size_t n) {
        if (n == 0) n = 1;
        this.n = n;
        while (true) {
            seg ~= new ulong[(n+63)/64];
            if (n == 1) break;
            n = (n+63)/64;
        }
    }
    bool empty() const { return seg.back[0] != 0; }  
    size_t length() const { return len; }  

    bool opBinaryRight(string op : "in")(size_t i) {
        assert(i < n);
         
        size_t D = i/64, R = i%64;
        return (seg[0][D] & (1UL << R)) != 0;
    }  
    void insert(size_t x) {
        if (x in this) return;
        len++;
        foreach (i; 0..seg.length) {
            size_t D = x/64, R = x%64;
            seg[i][D] |= (1UL << R);
            x /= 64;
        }
    }  
    void remove(size_t x) {
        if (x !in this) return;
        len--;
        size_t D = x/64, R = x%64;
        seg[0][D] &= ~(1UL << R);
        foreach (i; 1..seg.length) {
            x /= 64;
            if (seg[i-1][x]) break;
            D = x/64; R = x%64;
            seg[i][D] &= ~(1UL << R);
        }
    }  
     
    ptrdiff_t next(ptrdiff_t x) const {
        if (x < 0) x = 0;
        if (n <= x) return n;
        foreach (i; 0..seg.length) {
            if (x == seg[i].length * 64) break;
            size_t D = x/64, R = x%64;
            ulong B = seg[i][D]>>R;
            if (!B) {
                x = x/64+1;
                continue;
            }
             
            x += bsf(B);
            foreach_reverse (j; 0..i) {
                x *= 64;
                x += bsf(seg[j][x/64]);
            }
            return x;
        }
        return n;
    }
     
    ptrdiff_t prev(ptrdiff_t x) const {
        if (n <= x) x = n-1;
        if (x < 0) return -1;
        foreach (i; 0..seg.length) {
            if (x == -1) break;
            size_t D = x/64, R = x%64;
            ulong B = seg[i][D]<<(63-R);
            if (!B) {
                x = x/64-1;
                continue;
            }
             
            x += bsr(B)-63;
            foreach_reverse (j; 0..i) {
                x *= 64;
                x += bsr(seg[j][x/64]);
            }
            return x;
        }
        return -1;
    }
    
     
    Range lowerBound(ptrdiff_t x) {
        return Range(&this, next(0), prev(x-1));
    }
     
    Range upperBound(ptrdiff_t x) {
        return Range(&this, next(x+1), prev(n-1));
    }
    Range opIndex() {
        return Range(&this, next(0), prev(n-1));
    }
    static struct Range {
        FastSet* fs;
        ptrdiff_t lower, upper;

        @property bool empty() const { return upper < lower; }

        size_t front() const { return lower; }
        size_t back() const { return upper; }
        void popFront() {
            assert(!empty);
            lower = fs.next(lower+1);
        }
        void popBack() {
            assert(!empty);
            upper = fs.prev(upper-1);
        }
    }
}

 
 

/*
This source code generated by dcomp and include dcomp's source code.
dcomp's Copyright: Copyright (c) 2016- Kohei Morita. (https://github.com/yosupo06/dcomp)
dcomp's License: MIT License(https://github.com/yosupo06/dcomp/blob/master/LICENSE.txt)
*/


Measured memory_bytes: 7036