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 <map>
#include <set>
#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int n, a, b, d, x[100009], y[100009], c[100009]; bool vis[100009]; map<int, set<int> > cx, cy; map<int, vector<int> > vx, vy; map<pair<int, int>, int> inv;
int countval(int px, int py) {
	int la = lower_bound(vx[px - d].begin(), vx[px - d].end(), py - d) - vx[px - d].begin();
	int ra = lower_bound(vx[px - d].begin(), vx[px - d].end(), py + d) - vx[px - d].begin();
	int lb = lower_bound(vy[py + d].begin(), vy[py + d].end(), px - d) - vy[py + d].begin();
	int rb = lower_bound(vy[py + d].begin(), vy[py + d].end(), px + d) - vy[py + d].begin();
	int lc = lower_bound(vx[px + d].begin(), vx[px + d].end(), py - d + 1) - vx[px + d].begin();
	int rc = lower_bound(vx[px + d].begin(), vx[px + d].end(), py + d + 1) - vx[px + d].begin();
	int ld = lower_bound(vy[py - d].begin(), vy[py - d].end(), px - d + 1) - vy[py - d].begin();
	int rd = lower_bound(vy[py - d].begin(), vy[py - d].end(), px + d + 1) - vy[py - d].begin();
	return (ra - la) + (rb - lb) + (rc - lc) + (rd - ld);
}
vector<int> around(int px, int py) {
	set<int>::iterator la = cx[px - d].lower_bound(py - d);
	set<int>::iterator ra = cx[px - d].lower_bound(py + d);
	set<int>::iterator lb = cy[py + d].lower_bound(px - d);
	set<int>::iterator rb = cy[py + d].lower_bound(px + d);
	set<int>::iterator lc = cx[px + d].lower_bound(py - d + 1);
	set<int>::iterator rc = cx[px + d].lower_bound(py + d + 1);
	set<int>::iterator ld = cy[py - d].lower_bound(px - d + 1);
	set<int>::iterator rd = cy[py - d].lower_bound(px + d + 1);
	vector<int> ret;
	while (la != ra) ret.push_back(inv[make_pair(px - d, *la)]), la++;
	while (lb != rb) ret.push_back(inv[make_pair(*lb, py + d)]), lb++;
	while (lc != rc) ret.push_back(inv[make_pair(px + d, *lc)]), lc++;
	while (ld != rd) ret.push_back(inv[make_pair(*ld, py - d)]), ld++;
	return ret;
}
void dfs(int pos) {
	vis[pos] = true;
	vector<int> res = around(x[pos], y[pos]);
	for (int i : res) {
		cx[x[i]].erase(y[i]);
		cy[y[i]].erase(x[i]);
	}
	for (int i : res) {
		dfs(i);
	}
}
int main() {
	cin >> n >> a >> b; a--, b--;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		int tx = x[i] + y[i], ty = x[i] - y[i];
		x[i] = tx; y[i] = ty;
		cx[x[i]].insert(y[i]);
		cy[y[i]].insert(x[i]);
		inv[make_pair(x[i], y[i])] = i;
	}
	for (pair<int, set<int> > i : cx) vx[i.first] = vector<int>(i.second.begin(), i.second.end());
	for (pair<int, set<int> > i : cy) vy[i.first] = vector<int>(i.second.begin(), i.second.end());
	d = max(abs(x[a] - x[b]), abs(y[a] - y[b]));
	for (int i = 0; i < n; i++) c[i] = countval(x[i], y[i]);
	dfs(a);
	long long ret = 0;
	for (int i = 0; i < n; i++) {
		if (vis[i]) ret += c[i];
	}
	cout << ret / 2 << endl;
	return 0;
}