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<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<set>
#include<vector>
#include<queue>
#include<assert.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define gc getchar()
#define lint long long
#define mp make_pair
#define fir first
#define sec second
#define pb push_back
#define debug(x) cerr<<#x<<"="<<x
#define sp <<" "
#define ln <<endl
#define N 100010
using namespace std;
typedef pair<lint,int> plii;typedef set<plii> splii;typedef splii::iterator spliit;int lst[N*6];
queue<int> q;vector<lint> vec;splii s1[N*6],s2[N*6];vector<plii> v1[N*6],v2[N*6];lint x[N],y[N],d;
int vis[N],xpy[N],xmy[N],xpypd[N],xpymd[N],xmypd[N],xmymd[N];inline lint gabs(lint x) { return x<0?-x:x; }
inline int inn() { int x,ch;while((ch=gc)<'0'||ch>'9'); x=ch^'0';while((ch=gc)>='0'&&ch<='9') x=(x<<1)+(x<<3)+(ch^'0');return x; }
inline int getid(lint x) { return lower_bound(vec.begin(),vec.end(),x)-vec.begin()+1; }
inline int ins(int i) { return s1[xpy[i]].insert(mp(x[i],i)),s2[xmy[i]].insert(mp(x[i],i)),0; }
inline int del(int i) { return s1[xpy[i]].erase(mp(x[i],i)),s2[xmy[i]].erase(mp(x[i],i)),vis[i]=1,0; }
inline int tour(splii &s,lint a,lint b,int c=0)
{
	for(spliit it=s.lower_bound(mp(a,0));it!=s.end()&&it->fir<=b;it=s.lower_bound(mp(it->fir+1,0)))
		lst[++c]=it->sec,q.push(it->sec);rep(i,1,c) del(lst[i]);return 0;
}
inline int _ins(int i) { return v1[xpy[i]].pb(mp(x[i],i)),v2[xmy[i]].pb(mp(x[i],i)),0; }
inline int _init(vector<plii> &v) { return sort(v.begin(),v.end()),0; }
inline int query(vector<plii> &v,lint x)//<=x
{ int L=0,R=(int)v.size()-1,mid=(L+R)>>1;for(;L<=R;mid=(L+R)>>1) if(v[mid].fir<=x) L=mid+1;else R=mid-1;return L; }
inline int query(vector<plii> &v,lint a,lint b) { return query(v,b)-query(v,a-1); }
inline int query(int i)
{ return query(v1[xpypd[i]],x[i],x[i]+d-1)+query(v2[xmypd[i]],x[i]+1,x[i]+d)+query(v1[xpymd[i]],x[i]-d+1,x[i])+query(v2[xmymd[i]],x[i]-d,x[i]-1); }
int main()
{
	int n=inn(),a=inn(),b=inn();
	rep(i,1,n) x[i]=inn(),y[i]=inn();
	d=gabs(x[a]-x[b])+gabs(y[a]-y[b]);
	rep(i,1,n) vec.pb(x[i]+y[i]),vec.pb(x[i]-y[i]),vec.pb(x[i]+y[i]+d),vec.pb(x[i]-y[i]+d),vec.pb(x[i]+y[i]-d),vec.pb(x[i]-y[i]-d);
	sort(vec.begin(),vec.end()),vec.erase(unique(vec.begin(),vec.end()),vec.end());
	rep(i,1,n)
		xpy[i]=getid(x[i]+y[i]),xmy[i]=getid(x[i]-y[i]),
		xpypd[i]=getid(x[i]+y[i]+d),xpymd[i]=getid(x[i]+y[i]-d),
		xmypd[i]=getid(x[i]-y[i]+d),xmymd[i]=getid(x[i]-y[i]-d);
	rep(i,1,n) ins(i);q.push(a),q.push(b),del(a),del(b);
	while(!q.empty())
	{
		int i=q.front();q.pop();
		tour(s1[xpypd[i]],x[i],x[i]+d),tour(s1[xpymd[i]],x[i]-d,x[i]),
		tour(s2[xmymd[i]],x[i]-d,x[i]),tour(s2[xmypd[i]],x[i],x[i]+d);
	}
	lint ans=0ll;rep(i,1,n) if(vis[i]) _ins(i);
	rep(i,1,(int)vec.size()) _init(v1[i]),_init(v2[i]);
	rep(i,1,n) if(vis[i]) ans+=query(i);return !printf("%lld\n",ans/2);
}