# Original solution
N, a, b = list(map(int, input().split())); a -= 1; b -= 1
P = []
Q = []
for i in range(N):
    x, y = list(map(int, input().split()))
    P.append((x-y, x+y, i))
    Q.append((x+y, x-y, i))

d = max(abs(P[a][0] - P[b][0]), abs(P[a][1] - P[b][1]))

G = [set() for i in range(N)]

def solve(P0):
    P = P0[:]
    P.sort()

    s = t = 0
    for i in range(N):
        x, y, i0 = P[i]
        while t < N and P[t][0] < x-d or (P[t][0] == x-d and P[t][1] <= y+d): t += 1
        while s < N and (P[s][0] < x-d or (P[s][0] == x-d and P[s][1] < y-d)): s += 1
        for j in range(s, t):
            j0 = P[j][2]
            d0 = max(abs(P0[i0][0] - P0[j0][0]), abs(P0[i0][1] - P0[j0][1]))
            #assert d0 == d
            G[i0].add(j0)

    P.sort(key=lambda x: (-x[0], x[1], x[2]))

    s = t = 0
    for i in range(N):
        x, y, i0 = P[i]
        while t < N and x+d < P[t][0] or (P[t][0] == x+d and P[t][1] <= y+d): t += 1
        while s < N and (x+d < P[s][0] or (P[s][0] == x+d and P[s][1] < y-d)): s += 1
        for j in range(s, t):
            j0 = P[j][2]
            d0 = max(abs(P0[i0][0] - P0[j0][0]), abs(P0[i0][1] - P0[j0][1]))
            #assert d0 == d
            G[i0].add(j0)

solve(P)
solve(Q)

from collections import deque
que = deque([a])
used = {a}
res = 0
while que:
    v = que.popleft()
    to = G[v]
    res += len(to)
    for w in to:
        if w not in used:
            que.append(w)
            used.add(w)
print((res // 2))


# Optimized solution
N, a, b = list(map(int, input().split())); a -= 1; b -= 1
P = []
Q = []
for i in range(N):
    x, y = list(map(int, input().split()))
    P.append((x-y, x+y, i))
    Q.append((x+y, x-y, i))

d = max(abs(P[a][0] - P[b][0]), abs(P[a][1] - P[b][1]))

*parent, = list(range(N))
def root(x):
    if x == parent[x]:
        return x
    y = parent[x] = root(parent[x])
    return y
def unite(x, y):
    px = root(x); py = root(y)
    if px < py:
        parent[py] = px
    else:
        parent[px] = py
C = [0]*N
D = [0]*N

def solve(P0):
    P = P0[:]
    P.sort()

    s = t = 0
    for i in range(N):
        x, y, i0 = P[i]
        while t < N and P[t][0] < x-d or (P[t][0] == x-d and P[t][1] <= y+d): t += 1
        while s < N and (P[s][0] < x-d or (P[s][0] == x-d and P[s][1] < y-d)): s += 1
        for j in range(s, t):
            j0 = P[j][2]
            unite(i0, j0)
            if abs(P0[i0][0] - P0[j0][0]) == abs(P0[i0][1] - P0[j0][1]):
                D[i0] += 1
            else:
                C[i0] += 1
            #d0 = max(abs(P0[i0][0] - P0[j0][0]), abs(P0[i0][1] - P0[j0][1]))
            #assert d0 == d

    P.sort(key=lambda x: (-x[0], x[1], x[2]))

    s = t = 0
    for i in range(N):
        x, y, i0 = P[i]
        while t < N and x+d < P[t][0] or (P[t][0] == x+d and P[t][1] <= y+d): t += 1
        while s < N and (x+d < P[s][0] or (P[s][0] == x+d and P[s][1] < y-d)): s += 1
        for j in range(s, t):
            j0 = P[j][2]
            unite(i0, j0)
            #d0 = max(abs(P0[i0][0] - P0[j0][0]), abs(P0[i0][1] - P0[j0][1]))
            #assert d0 == d
            if abs(P0[i0][0] - P0[j0][0]) == abs(P0[i0][1] - P0[j0][1]):
                D[i0] += 1
            else:
                C[i0] += 1

solve(P)
solve(Q)

ans = 0
r = root(a)
for i in range(N):
    if root(i) == r:
        ans += C[i] + D[i]//2
print((ans // 2))