#include<bits/stdc++.h>
#define MP make_pair
#define FR first
#define SE second
using namespace std;

const int S=(1<<20)+5;
char buf[S],*H,*T;
inline char Get()
{
    if(H==T) T=(H=buf)+fread(buf,1,S,stdin);
    if(H==T) return -1;return *H++;
}
inline int read()
{
    int x=0;char c=Get();
    while(!isdigit(c)) c=Get();
    while(isdigit(c)) x=x*10+c-'0',c=Get();
    return x;
}

typedef pair<int,int> pii;
typedef long long LL;
const int N=100010;
struct Point
{
    int x,y;
    Point(int _x=0,int _y=0):x(_x),y(_y){}
    Point rotate(){return Point(x+y,y-x);}
    bool operator != (Point b){return x!=b.x||y!=b.y;}
} org[N],rtg[N],prg[N];
set<pii> sx[N],sy[N];
vector<pii> vx[N],vy[N];
queue<int> q;
bool vis[N];
int Hx[N],Hy[N],mx,my;
int n,A,B,d;
LL ans=0;

void prework()
{
    sort(Hx+1,Hx+1+n);sort(Hy+1,Hy+1+n);
    mx=unique(Hx+1,Hx+1+n)-(Hx+1);
    my=unique(Hy+1,Hy+1+n)-(Hy+1);
    for(int i=1;i<=n;i++)
    {
        prg[i].x=lower_bound(Hx+1,Hx+1+mx,rtg[i].x)-Hx;
        prg[i].y=lower_bound(Hy+1,Hy+1+my,rtg[i].y)-Hy;
        sx[prg[i].x].insert(MP(rtg[i].y,i));
        sy[prg[i].y].insert(MP(rtg[i].x,i));
        vx[prg[i].x].push_back(MP(rtg[i].y,i));
        vy[prg[i].y].push_back(MP(rtg[i].x,i));
    }
    for(int i=1;i<=mx;i++) sort(vx[i].begin(),vx[i].end());
    for(int i=1;i<=my;i++) sort(vy[i].begin(),vy[i].end());
}

pii gao(set<pii> &s,vector<pii> &v,int l,int r)
{
    ans+=upper_bound(v.begin(),v.end(),MP(r,n))-lower_bound(v.begin(),v.end(),MP(l,0));
    auto pl=s.lower_bound(MP(l,0)),pr=s.upper_bound(MP(r,n));
    for(auto it=pl;it!=pr;)
    {
        if(!vis[it->SE])
        {
            vis[it->SE]=1;
            q.push(it->SE);
        }
        auto it2=it;it2++;
        s.erase(it);it=it2;
    }
    auto ppl=lower_bound(v.begin(),v.end(),MP(l,0));
    auto ppr=lower_bound(v.begin(),v.end(),MP(r,0));
    return MP(ppl==v.end()?0:ppl->SE,ppr==v.end()?0:ppr->SE);
}

void BFS()
{
    vis[A]=1;q.push(A);
    while(!q.empty())
    {
        int u=q.front();q.pop();
        bool flag1=0,flag2=0,flag3=0,flag4=0;
        pii p1,p2,p3,p4;Point pt=org[u];
        Point pt1=Point(pt.x+d,pt.y).rotate();
        Point pt2=Point(pt.x,pt.y+d).rotate();
        Point pt3=Point(pt.x-d,pt.y).rotate();
        Point pt4=Point(pt.x,pt.y-d).rotate();
        int p=lower_bound(Hx+1,Hx+1+mx,pt1.x)-Hx;
        if(Hx[p]==pt1.x)
        {
            p1=gao(sx[p],vx[p],pt1.y,pt2.y);
            if(rtg[p1.FR]!=pt1||!p1.FR) p1.FR=-1;
            if(rtg[p1.SE]!=pt2||!p1.SE) p1.SE=-2;
            flag1=1;
        }
        p=lower_bound(Hx+1,Hx+1+mx,pt3.x)-Hx;
        if(Hx[p]==pt3.x)
        {
            p2=gao(sx[p],vx[p],pt4.y,pt3.y);
            if(rtg[p2.FR]!=pt4||!p2.FR) p2.FR=-3;
            if(rtg[p2.SE]!=pt3||!p2.SE) p2.SE=-4;
            flag2=1;
        }
        p=lower_bound(Hy+1,Hy+1+my,pt2.y)-Hy;
        if(Hy[p]==pt2.y)
        {
            p3=gao(sy[p],vy[p],pt3.x,pt2.x);
            if(rtg[p3.FR]!=pt3||!p3.FR) p3.FR=-5;
            if(rtg[p3.SE]!=pt2||!p3.SE) p3.SE=-6;
            flag3=1;
        }
        p=lower_bound(Hy+1,Hy+1+my,pt1.y)-Hy;
        if(Hy[p]==pt1.y)
        {
            p4=gao(sy[p],vy[p],pt4.x,pt1.x);
            if(rtg[p4.FR]!=pt4||!p4.FR) p4.FR=-7;
            if(rtg[p4.SE]!=pt1||!p4.SE) p4.SE=-8;
            flag4=1;
        }
        if(flag1&&flag3&&p1.SE==p3.SE) ans--;
        if(flag2&&flag3&&p2.SE==p3.FR) ans--;
        if(flag2&&flag4&&p2.FR==p4.FR) ans--;
        if(flag4&&flag1&&p4.SE==p1.FR) ans--;
    }
}

int main()
{
    n=read();A=read();B=read();
    for(int i=1;i<=n;i++)
    {
        org[i].x=read();
        org[i].y=read();
        rtg[i]=org[i].rotate();
        Hx[i]=rtg[i].x;
        Hy[i]=rtg[i].y;
    }
    d=abs(org[A].x-org[B].x)+abs(org[A].y-org[B].y);
    prework();BFS();
    printf("%lld\n",ans/2);
    return 0;
}

Measured memory_bytes: 33656