Problem: There are N pinholes on the xy-plane. The i-th pinhole is located at (x_i,y_i).

We will denote the Manhattan distance between the i-th and j-th pinholes as d(i,j)(=|x_i-x_j|+|y_i-y_j|).

You have a peculiar pair of compasses, called Manhattan Compass. This instrument always points at two of the pinholes. The two legs of the compass are indistinguishable, thus we do not distinguish the following two states: the state where the compass points at the p-th and q-th pinholes, and the state where it points at the q-th and p-th pinholes.

When the compass points at the p-th and q-th pinholes and d(p,q)=d(p,r), one of the legs can be moved so that the compass will point at the p-th and r-th pinholes.

Initially, the compass points at the a-th and b-th pinholes. Find the number of the pairs of pinholes that can be pointed by the compass.

Constraints

* 2≦N≦10^5
* 1≦x_i, y_i≦10^9
* 1≦a < b≦N
* When i ≠ j, (x_i, y_i) ≠ (x_j, y_j)
* x_i and y_i are integers.

Input

The input is given from Standard Input in the following format:


N a b
x_1 y_1
:
x_N y_N


Output

Print the number of the pairs of pinholes that can be pointed by the compass.

Examples

Input

5 1 2
1 1
4 3
6 1
5 5
4 8


Output

4


Input

6 2 3
1 3
5 3
3 5
8 4
4 7
2 5


Output

4


Input

8 1 2
1 5
4 3
8 2
4 7
8 8
3 3
6 6
4 8


Output

7

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
#define pi 3.1415926535897932384626
using namespace std;
      
struct P{
  long long x,y;
  /*bool operator < (const P &a )const{
    //if(y!=a.y)
    return y<a.y;
  };*/
};

int a,b,c,d,i,k,n,m,e,dx[10]={1,0,-1,0,1,1,-1,-1},dy[10]={0,1,0,-1,1,-1,1,-1};
int o[100100];
int l[101];
int j[1];

long long x,y,z,mod=1000000007;
//string r;
char r[11];

P u[100111];
queue<int> q;
//stack<int> s;
set<long long> s[2][333333];
map<int,long long> p[333333];
map<long long ,int> p1;

vector<long long> v1,v[2][333333];


bool as(P a,P b)
{
  //if(a.x!=b.x)
  //return a.x<b.x;
  return a.x<b.x;
}

int f(int i1,int i2,long long n,long long m)
{
  if(v[i1][i2].size()==0||v[i1][i2].back()<n||v[i1][i2][0]>m) return 0;
  //puts("#");
  //printf("$$%lld %lld\n",n,m);
  int a=0,b=v[i1][i2].size()-1,c=0,d=v[i1][i2].size()-1;
  for(;a<b;)
  {
    int h=(a+b)/2;
    if(v[i1][i2][h]<n) a=h+1;
    else b=h;
  }
  for(;c<d;)
  {
    int h=(c+d)/2+1;
    if(v[i1][i2][h]>m) d=h-1;
    else c=h;
  }
  int k=max(0,c-a+1);
  set<long long>::iterator e=s[i1][i2].lower_bound(n);
  for(;e!=s[i1][i2].end()&&(*e)<=m;)
  {
    set<long long>::iterator e1=e;
    e++;
    if(!i1) q.push(p[i2][*e1]);
    else q.push(p[p1[*e1]][v1[i2]]);
    s[i1][i2].erase(e1);
  }
  return k;
}

int main()
{
  scanf("%d %d %d",&a,&b,&c);
  for(int t=1;t<=a;t++)
  {
    scanf("%d %d",&n,&m);
    //printf("!%d %d\n",n+m,n-m);
    u[t]={n+m,n-m};
    v1.push_back(n+m);
    v1.push_back(n-m);
  }
  v1.push_back(-mod*mod);
  sort(v1.begin(),v1.end());
  v1.resize(unique(v1.begin(),v1.end())-v1.begin());
  for(int h=1;h<v1.size();h++)
    p1[v1[h]]=h;
  for(int t=1;t<=a;t++)
  {
    p[p1[u[t].x]][u[t].y]=t;
    v[0][p1[u[t].x]].push_back(u[t].y);
    v[1][p1[u[t].y]].push_back(u[t].x);
    s[0][p1[u[t].x]].insert(u[t].y);
    s[1][p1[u[t].y]].insert(u[t].x);
  }
  for(int t=1;t<v1.size();t++)
  {
    sort(v[0][t].begin(),v[0][t].end());
    sort(v[1][t].begin(),v[1][t].end());
  }
  x=max(abs(u[b].x-u[c].x),abs(u[b].y-u[c].y));
  q.push(b);
  for(;q.size();q.pop())
  if(!o[q.front()])
  {
    o[q.front()]=1;
    if(p1[u[q.front()].x+x])
      y+=f(0,p1[u[q.front()].x+x],u[q.front()].y-x,u[q.front()].y+x);
    if(p1[u[q.front()].x-x])
      y+=f(0,p1[u[q.front()].x-x],u[q.front()].y-x,u[q.front()].y+x);
    if(p1[u[q.front()].y+x])
      y+=f(1,p1[u[q.front()].y+x],u[q.front()].x-x+1,u[q.front()].x+x-1);
    //
    if(p1[u[q.front()].y-x])
      y+=f(1,p1[u[q.front()].y-x],u[q.front()].x-x+1,u[q.front()].x+x-1);
    //printf("%d %lld\n",q.front(),y);
  }
  //else printf("%d\n",q.front());
  printf("%lld",y/2);
}
//4
//21