#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<lint, lint>;

int N, a, b;
vector<P> z;
set<pair<P, int> > v, w;

lint dis(P p1, P p2)
{
    return abs(p1.first - p2.first) + abs(p1.second - p2.second);
}

int main()
{
    cin >> N >> a >> b;
    a--;
    b--;
    z.resize(N);

    for (int i=0; i<N; i++)
    {
        cin >> z[i].first >> z[i].second;
        v.insert(make_pair(make_pair(z[i].second - z[i].first, z[i].second+z[i].first), i));
        w.insert(make_pair(make_pair(z[i].first + z[i].second, z[i].second-z[i].first), i));
    }

    vector<bool> visited(N, 0);
    visited[a] = 1;
    queue<int> q;
    q.push(a);
    lint d = dis(z[a], z[b]);

    while (!q.empty())
    {
        int n = q.front();
        q.pop();

        for (lint d_ = -d; d_<=d; d_ += 2*d)
        {
            pair<P, int> p1 = make_pair(make_pair(z[n].first + z[n].second - d_, z[n].second-z[n].first-d), 0);
            auto itr1 = w.lower_bound(p1);
            auto itr2 = w.upper_bound(make_pair(make_pair(z[n].first + z[n].second - d_, z[n].second-z[n].first+d+1), -1));
            for (auto itr = itr1; itr != itr2; itr++)
            {
                if (!visited[(*itr).second])
                {
                    q.push((*itr).second);
                    visited[(*itr).second] = true;
                }
            }
            w.erase(itr1, itr2);
        }
        for (lint d_ = -d; d_<=d; d_ += 2*d)
        {
            auto itr1 = v.lower_bound(make_pair(make_pair(z[n].second - z[n].first - d_, z[n].first+z[n].second-d), 0));
            auto itr2 = v.upper_bound(make_pair(make_pair(z[n].second - z[n].first - d_, z[n].first+z[n].second+d+1), -1));
            for (auto itr = itr1; itr != itr2; itr++)
            {
                if (!visited[(*itr).second])
                {
                    q.push((*itr).second);
                    visited[(*itr).second] = 1;
                }
            }
            v.erase(itr1, itr2);
        }
    }

    vector<P> g, gi;
    for (int i=0; i<N; i++) if(visited[i])
    {
        g.push_back(make_pair(z[i].second-z[i].first, z[i].second+z[i].first));
        gi.push_back(make_pair(z[i].second+z[i].first, z[i].second-z[i].first));
    }
    sort(g.begin(), g.end());
    sort(gi.begin(), gi.end());
    
    lint ans = 0;
    for (auto v : g)
    {
        {
            auto itr1 = lower_bound(g.begin(), g.end(), make_pair(v.first+d, v.second-d));
            auto itr2 = upper_bound(g.begin(), g.end(), make_pair(v.first+d, v.second+d));
            ans += itr2 - itr1;
        }
        {
            auto itr1 = lower_bound(g.begin(), g.end(), make_pair(v.first-d, v.second-d));
            auto itr2 = upper_bound(g.begin(), g.end(), make_pair(v.first-d, v.second+d));
            ans += itr2 - itr1;
        }
    }
    for (auto v : gi)
    {
        {
            auto itr1 = lower_bound(gi.begin(), gi.end(), make_pair(v.first+d, v.second-d+1));
            auto itr2 = upper_bound(gi.begin(), gi.end(), make_pair(v.first+d, v.second+d-1));
            ans += itr2 - itr1;
        }
        {
            auto itr1 = lower_bound(gi.begin(), gi.end(), make_pair(v.first-d, v.second-d+1));
            auto itr2 = upper_bound(gi.begin(), gi.end(), make_pair(v.first-d, v.second+d-1));
            ans += itr2 - itr1;
        }
    }
    cout << ans/2 << endl;
}


Measured memory_bytes: 17772