#include<bits/stdc++.h>
#define x first
#define y second

using namespace std;

int i1, i2, L, dx, dy, N, M, x[100009], y[100009], x2[100009], y2[100009], x_l[100009], y_l[100009], x_r[100009], y_r[100009];
bool ap[100009];
map < int, int > mp_x, mp_y;
vector < int > nx, ny;
set < pair < int, int > > Sx[100009], Sy[100009];
vector < int > vx[100009], vy[100009];

void ad (int i)
{
    Sx[x2[i]].insert (make_pair (y[i], i));
    Sy[y2[i]].insert (make_pair (x[i], i));
}

void dfs (int i)
{
    ap[i] = 1;
    if (x_l[i])
    {
        int lin = x_l[i], st = y[i] - L, dr = y[i] + L;
        while (!Sx[lin].empty ())
        {
            auto it = Sx[lin].lower_bound (make_pair (st, 0));
            if (it != Sx[lin].end () && it->first <= dr)
            {
                int j = it->second;
                Sx[lin].erase (it);
                if (ap[j] == 0) dfs (j);
            }
            else break;
        }
    }
    if (x_r[i])
    {
        int lin = x_r[i], st = y[i] - L, dr = y[i] + L;
        while (!Sx[lin].empty ())
        {
            auto it = Sx[lin].lower_bound (make_pair (st, 0));
            if (it != Sx[lin].end () && it->first <= dr)
            {
                int j = it->second;
                Sx[lin].erase (it);
                if (ap[j] == 0) dfs (j);
            }
            else break;
        }
    }
    if (y_l[i])
    {
        int lin = y_l[i], st = x[i] - L, dr = x[i] + L;
        while (!Sy[lin].empty ())
        {
            auto it = Sy[lin].lower_bound (make_pair (st, 0));
            if (it != Sy[lin].end () && it->first <= dr)
            {
                int j = it->second;
                Sy[lin].erase (it);
                if (ap[j] == 0) dfs (j);
            }
            else break;
        }
    }
    if (y_r[i])
    {
        int lin = y_r[i], st = x[i] - L, dr = x[i] + L;
        while (!Sy[lin].empty ())
        {
            auto it = Sy[lin].lower_bound (make_pair (st, 0));
            if (it != Sy[lin].end () && it->first <= dr)
            {
                int j = it->second;
                Sy[lin].erase (it);
                if (ap[j] == 0) dfs (j);
            }
            else break;
        }
    }
}

int modul (int x) {if (x < 0) return -x; return x;}
void ReadAndComp ()
{
    int a1 = 0, b1 = 0;
    for (int i=1; i<=N; i++)
    {
        int a, b;
        scanf ("%d %d", &a, &b);
        if (i1 == i) a1 = a, b1 = b;
        else
        if (i2 == i) L = modul (a - a1) + modul (b - b1);
        x[i] = a + b, y[i] = a - b;
    }
    for (int i=1; i<=N; i++)
        nx.push_back (x[i]), ny.push_back (y[i]);
    sort (nx.begin (), nx.end ());
    nx.erase (unique (nx.begin (), nx.end ()), nx.end ());
    sort (ny.begin (), ny.end ());
    ny.erase (unique (ny.begin (), ny.end ()), ny.end ());
    dx = nx.size (), dy = ny.size ();
    for (int i=0; i<dx; i++)
        mp_x[nx[i]] = i + 1;
    for (int i=0; i<dy; i++)
        mp_y[ny[i]] = i + 1;
    for (int i=1; i<=N; i++)
    {
        if (mp_x.count (x[i] - L)) x_l[i] = mp_x[x[i] - L];
        if (mp_x.count (x[i] + L)) x_r[i] = mp_x[x[i] + L];
        if (mp_y.count (y[i] - L)) y_l[i] = mp_y[y[i] - L];
        if (mp_y.count (y[i] + L)) y_r[i] = mp_y[y[i] + L];
        x2[i] = mp_x[x[i]], y2[i] = mp_y[y[i]];
    }
    for (int i=1; i<=N; i++)
        if (i != i1 && i != i2)
            ad (i);
    ap[i1] = ap[i2] = 1;
    dfs (i1), dfs (i2);
}

void adx (int i, int j)
{
    vx[i].push_back (j);
}

void ady (int i, int j)
{
    vy[i].push_back (j);
}

void Prec ()
{
    for (int i=1; i<=dx; i++)
        sort (vx[i].begin (), vx[i].end ());
    for (int i=1; i<=dy; i++)
        sort (vy[i].begin (), vy[i].end ());
}

void ad2 (int i)
{
    adx (x2[i], y[i]);
    ady (y2[i], x[i]);
}

int Qrx (int i, int j, int k)
{
    if (i == 0) return 0;
    if (vx[i].empty ()) return 0;
    if (i == 1 && j == -5 && k == 1)
        j = -5;
    int p = 0, u = vx[i].size () - 1, st = vx[i].size (), dr = -1;
    while (p <= u)
    {
        int mij = (p + u) >> 1;
        if (vx[i][mij] >= j) st = mij, u = mij - 1;
        else p = mij + 1;
    }
    p = 0, u = vx[i].size () - 1;
    while (p <= u)
    {
        int mij = (p + u) >> 1;
        if (vx[i][mij] <= k) dr = mij, p = mij + 1;
        else u = mij - 1;
    }
    if (st > dr) return 0;
    return dr - st + 1;
}

int Qry (int i, int j, int k)
{
    if (i == 0) return 0;
    if (vy[i].empty ()) return 0;
    int p = 0, u = vy[i].size () - 1, st = vy[i].size (), dr = -1;
    while (p <= u)
    {
        int mij = (p + u) >> 1;
        if (vy[i][mij] >= j) st = mij, u = mij - 1;
        else p = mij + 1;
    }
    p = 0, u = vy[i].size () - 1;
    while (p <= u)
    {
        int mij = (p + u) >> 1;
        if (vy[i][mij] <= k) dr = mij, p = mij + 1;
        else u = mij - 1;
    }
    if (st > dr) return 0;
    return dr - st + 1;
}

int main ()
{
//freopen ("input", "r", stdin);
//freopen ("output", "w", stdout);

scanf ("%d %d %d", &N, &i1, &i2);
ReadAndComp ();
//for (int i=1; i<=N; i++)
  //  printf ("%d %d    %d %d\n", x[i], y[i], x2[i], y2[i]);
for (int i=0; i<=dx; i++)
    Sx[i].clear ();
for (int i=0; i<=dy; i++)
    Sy[i].clear ();
for (int i=1; i<=N; i++)
    if (ap[i] == 1) ad2 (i);
//for (int i=1; i<=N; i++)
  //  printf ("%d\n", ap[i]);
Prec ();
long long sol = 0;
for (int i=1; i<=N; i++)
if (ap[i])
{
    //int old_s = sol;
    sol += Qrx (x_l[i], y[i] - L + 1, y[i] + L - 1);
    sol += Qrx (x_r[i], y[i] - L + 1, y[i] + L - 1);
    sol += Qry (y_l[i], x[i] - L, x[i] + L);
    sol += Qry (y_r[i], x[i] - L, x[i] + L);
    //printf ("%d -> %d neighbors\n", i, sol - old_s);
}
printf ("%lld\n", sol / 2);
return 0;
}


Measured memory_bytes: 39156