Problem: The city of Kyoto is a famous tourist destination for old temples and shrines.

Ikta came to Kyoto sightseeing with a few friends, but as a result of all acting freely, they all got lost.

So Ikta decided to think about where to meet in order to meet everyone as soon as possible.

Kyoto's roads run innumerably at intervals of 10 from east to west and north to south, and can be regarded as an infinitely wide square grid.

Roads are considered straight and have no width. In addition, the position moved by a distance x to the east and a distance y to the north with respect to the center of the city is represented by the coordinates (x, y).

At the center of the city (0,0), the east-west road and the north-south road intersect.

The figure below illustrates the roads of Kyoto and the coordinates of some points.


<image>


Since the coordinates (Xi, Yi) of N tourists are given as integers, answer the minimum time required for N people to move on the road and gather at one point.

Tourists can move continuously on the road at a speed of 1 distance per hour.

The coordinates of the N tourists given are different, and all coordinates are guaranteed to be on the road.

It is also possible for multiple tourists to exist at one point at the same time, or for tourists to move so that they pass each other.



Input

The input is given in the following format.

> N
> X1 Y1
> ...
> XN YN
>

N in the first line is the number of tourists. The i-th line (1 ≤ i ≤ N) of the next N lines represents the location of the i-th tourist (Xi, Yi). Xi and Yi are given as integers, respectively.

Constraints

Each variable being input satisfies the following constraints.

* 2 ≤ N ≤ 10000
* −108 ≤ Xi, Yi ≤ 108
* When i ≠ j (Xi, Yi) ≠ (Xj, Yj)
* At least one of Xi and Yi is a multiple of 10.

Output

Print the solution to the problem on one line. Allows absolute error up to 10-3.

Examples

Input

3
5 10
-10 0
3 -10


Output

14


Input

2
0 0
0 1


Output

0.5


Input

4
100000000 100000000
100000000 -100000000
-100000000 100000000
-100000000 -100000000


Output

200000000

Solution (in CPP):

Solution:
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-9;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	vector<int>x(N);
	vector<int>y(N);
	int xl = MOD, xr = -MOD, yl = MOD, yr = -MOD;
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> y[i];
		x[i] <<= 1, y[i] <<= 1;
		x[i] += 400000000;
		y[i] += 100000000;
		int X, Y;
		tie(X, Y) = make_pair(x[i] + y[i], x[i] - y[i]);
		xl = min(xl, X);
		xr = max(xr, X);
		yl = min(yl, Y);
		yr = max(yr, Y);
		
	}
	int xmid = (xl + xr) / 2;
	int ymid = (yl + yr) / 2;
	int ans = MOD;
	int len = 100;
	for (int i = xmid - len; i <= xmid + len; i++) {
		for (int j = ymid - len; j <= ymid + len; j++) {
			if (abs(i - j) % 2)continue;
			int w = (i + j) / 2;
			int h = i - w;
			if (w % 20 && h % 20)continue;
			int box = 0;
			for (int k = 0; k < N; k++) {
				if ((w+1000000000) / 20 == (x[k]+1000000000) / 20) {
					if (h == y[k])box = max(box, abs(w - x[k]));
					else box = max(box, abs(h - y[k]) + min(40 - (w % 20 + x[k] % 20), (w % 20 + x[k] % 20)));
				}
				else if ((h+1000000000) / 20 == (y[k]+1000000000) / 20) {
					if (w == x[k])box = max(box, abs(h - y[k]));
					else box = max(box, abs(w - x[k]) + min(40 - (h % 20 + y[k] % 20), (h % 20 + y[k] % 20)));
				}
				else {
					box = max(box, abs(h - y[k]) + abs(w - x[k]));
				}
			}
			//cout << w << " " << h << " " << box << endl;
			ans = min(ans, box);
		}
	}
	cout << ans / 2;
	if (ans & 1)cout << "." << 5;
	cout << endl;
}