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<cstdio>
#include<cstring>
#include<algorithm>
#define N 100010
#define ll long long
using namespace std;

struct aa{int x, y, id;}a[N], a1[N], a2[N];
struct data{int l, r;}b[N][4];
int n, X, Y, x, y, D, f1[N], f2[N], flag[N], op, cl, d[N], p, L, R, pos1[N], pos2[N];
ll ans;

inline int abs(int x){return max(x, -x);}

inline bool cmp1(aa a, aa b){
	if(a.x!=b.x)return a.x<b.x;
	return a.y<b.y;
}
inline bool cmp2(aa a, aa b){
	if(a.y!=b.y)return a.y<b.y;
	return a.x<b.x;
}

inline int gether1(int x){return f1[x]?f1[x]=gether1(f1[x]):x;}
inline int gether2(int x){return f2[x]?f2[x]=gether2(f2[x]):x;}
inline void ins(int i){flag[i]=1; f1[pos1[i]]=pos1[i]+1; f2[pos2[i]]=pos2[i]+1; d[++cl]=i;}

int main(){
	scanf("%d%d%d", &n, &X, &Y);
	for(int i=1; i<=n; i++){scanf("%d%d", &x, &y); a[i].x=x+y; a[i].y=x-y; a[i].id=i;}
	D=max(abs(a[X].x-a[Y].x), abs(a[X].y-a[Y].y));
	memcpy(a1, a, sizeof(a1)); memcpy(a2, a, sizeof(a2));
	sort(a1+1, a1+1+n, cmp1); sort(a2+1, a2+1+n, cmp2);
	for(int i=1; i<=n; i++)pos1[a1[i].id]=i;
	for(int i=1; i<=n; i++)pos2[a2[i].id]=i;
	op=1; cl=0;
	for(int i=1; i<=n; i++){
		x=a1[i].id; p=a[x].x-D; L=a[x].y-D; R=a[x].y+D;
		while(op<=n&&(a1[op].x<p||(a1[op].x==p&&a1[op].y<L)))op++;
		while(cl<n&&(a1[cl+1].x<p||(a1[cl+1].x==p&&a1[cl+1].y<=R)))cl++;
		b[x][0].l=op; b[x][0].r=cl;
	}
	op=n; cl=n+1;
	for(int i=n; i; i--){
		x=a1[i].id; p=a[x].x+D; L=a[x].y-D; R=a[x].y+D;
		while(op&&(a1[op].x>p||(a1[op].x==p&&a1[op].y>R)))op--;
		while(cl>1&&(a1[cl-1].x>p||(a1[cl-1].x==p&&a1[cl-1].y>=L)))cl--;
		b[x][1].l=cl; b[x][1].r=op;
	}
	op=1; cl=0;
	for(int i=1; i<=n; i++){
		x=a2[i].id; p=a[x].y-D; L=a[x].x-D+1; R=a[x].x+D-1;
		while(op<=n&&(a2[op].y<p||(a2[op].y==p&&a2[op].x<L)))op++;
		while(cl<n&&(a2[cl+1].y<p||(a2[cl+1].y==p&&a2[cl+1].x<=R)))cl++;
		b[x][2].l=op; b[x][2].r=cl;
	}
	op=n; cl=n+1;
	for(int i=n; i; i--){
		x=a2[i].id; p=a[x].y+D; L=a[x].x-D+1; R=a[x].x+D-1;
		while(op&&(a2[op].y>p||(a2[op].y==p&&a2[op].x>R)))op--;
		while(cl>1&&(a2[cl-1].y>p||(a2[cl-1].y==p&&a2[cl-1].x>=L)))cl--;
		b[x][3].l=cl; b[x][3].r=op;
	}
	memset(f1, 0, sizeof(f1)); memset(f2, 0, sizeof(f2)); memset(flag, 0, sizeof(flag));
	ins(X); ins(Y);
	op=0; cl=2; d[1]=X; d[2]=Y;
	while(op<cl){
		op++; x=d[op];
		for(int i=gether1(b[x][0].l); i<=b[x][0].r; i=gether1(i+1))ins(a1[i].id);
		for(int i=gether1(b[x][1].l); i<=b[x][1].r; i=gether1(i+1))ins(a1[i].id);
		for(int i=gether2(b[x][2].l); i<=b[x][2].r; i=gether2(i+1))ins(a2[i].id);
		for(int i=gether2(b[x][3].l); i<=b[x][3].r; i=gether2(i+1))ins(a2[i].id);
	}
	ans=0;
	for(int i=1; i<=n; i++)if(flag[i])
		for(int j=0; j<=3; j++)ans+=b[i][j].r-b[i][j].l+1;
	ans>>=1; printf("%lld", ans);
	return 0;
}