Chef bought a huge (effectively infinite) planar island and built $N$ restaurants (numbered $1$ through $N$) on it. For each valid $i$, the Cartesian coordinates of restaurant $i$ are $(X_i, Y_i)$.
Now, Chef wants to build $N-1$ straight narrow roads (line segments) on the island. The roads may have arbitrary lengths; restaurants do not have to lie on the roads. The slope of each road must be $1$ or $-1$, i.e. for any two points $(x_1, y_1)$ and $(x_2, y_2)$ on the same road, $|x_1-x_2| = |y_1-y_2|$ must hold.
Let's denote the minimum distance Chef has to walk from restaurant $i$ to reach a road by $D_i$. Then, let's denote $a = \mathrm{max}\,(D_1, D_2, \ldots, D_N)$; Chef wants this distance to be minimum possible.
Chef is a busy person, so he decided to give you the job of building the roads. You should find a way to build them that minimises $a$ and compute $a \cdot \sqrt{2}$.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $N$.
- $N$ lines follow. For each valid $i$, the $i$-th of these lines contains two space-separated integers $X_i$ and $Y_i$.

-----Output-----
For each test case, print a single line containing one real number — the minimum distance $a$ multiplied by $\sqrt{2}$. Your answer will be considered correct if its absolute or relative error does not exceed $10^{-6}$.

-----Constraints-----
- $1 \le T \le 100$
- $2 \le N \le 10^4$
- $|X_i|, |Y_i| \le 10^9$ for each valid $i$

-----Subtasks-----
Subtask #1 (10 points):
- $1 \le T \le 10$
- $2 \le N \le 5$
- $|X_i|, |Y_i| \le 10$ for each valid $i$
- $a \cdot \sqrt{2}$ is an integer
Subtask #2 (90 points): original constraints

-----Example Input-----
2
3
0 0
0 1
0 -1
3
0 1
1 0
-1 0

-----Example Output-----
0.5
0

-----Explanation-----
Example case 1: We should build roads described by equations $y-x+0.5 = 0$ and $y-x-0.5 = 0$.
Example case 2: We should build roads described by equations $y-x-1 = 0$ and $y+x-1 = 0$.

Difficulty: MEDIUM_HARD

Solutions:
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	d = []
	dl = []
	for i in range(n):
		(x, y) = map(int, input().split())
		d.append(y - x)
		dl.append(y + x)
	d = sorted(d)
	dl = sorted(dl)
	ans = abs(d[0] - d[1])
	k = 0
	while k < n - 1:
		ans = min(ans, abs(d[k] - d[k + 1]))
		ans = min(ans, abs(dl[k] - dl[k + 1]))
		k += 1
	if ans % 2 == 0:
		print(int(ans / 2))
	else:
		print(ans / 2)


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	islp = []
	slp = []
	for i in range(n):
		(x, y) = map(int, stdin.readline().split())
		slp.append(y - x)
		islp.append(x + y)
	if len(set(slp)) < n or len(set(islp)) < n:
		print(0)
	else:
		islp = sorted(islp)
		slp = sorted(slp)
		ians = [abs(islp[0] - islp[1])]
		ans = [abs(slp[0] - slp[1])]
		for i in range(1, n - 1):
			ians.append(min(abs(islp[i - 1] - islp[i]), abs(islp[i] - islp[i + 1])))
			ans.append(min(abs(slp[i - 1] - slp[i]), abs(slp[i] - slp[i + 1])))
		print(min(min(ians) / 2, min(ans) / 2))


res = []

def getMin(nums):
	nums.sort()
	diff = 1000000000
	for i in range(len(nums) - 1):
		diff = min(abs(nums[i + 1] - nums[i]), diff)
	return diff
x = int(input())
for _ in range(x):
	slope1Dist = {}
	slope2Dist = {}
	dist1 = []
	dist2 = []
	zero = False
	n = int(input())
	for i in range(n):
		(x, y) = map(int, input().strip().split(' '))
		if y - x not in slope1Dist:
			slope1Dist[y - x] = 1
			dist1.append(y - x)
		else:
			zero = True
		if y + x not in slope2Dist:
			slope2Dist[y + x] = 1
			dist2.append(y + x)
		else:
			zero = True
	if zero:
		res.append(0)
	else:
		dmin = 1000000000
		if len(dist1) > 0:
			dmin = min(dmin, getMin(dist1))
		if len(dist2) > 0:
			dmin = min(dmin, getMin(dist2))
		res.append(dmin / 2)
for xx in res:
	print(xx)


T = int(input())
for i in range(T):
	N = int(input())
	l1 = []
	l2 = []
	for j in range(N):
		(a, b) = map(int, input().split())
		l1.append(a - b)
		l2.append(a + b)
	l1.sort()
	l2.sort()
	m1 = 100000000000000000000000
	for j in range(1, len(l1)):
		if l1[j] - l1[j - 1] < m1:
			m1 = l1[j] - l1[j - 1]
	m2 = 1000000000000000000000
	for j in range(1, len(l2)):
		if l2[j] - l2[j - 1] < m2:
			m2 = l2[j] - l2[j - 1]
	if min(m1, m2) % 2 == 0:
		print(min(m1, m2) // 2)
	else:
		print(min(m1, m2) / 2)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
t = iinput()
for _ in range(t):
	n = iinput()
	p = []
	mi = []
	for i in range(n):
		(x, y) = rinput()
		p.append(x + y)
		mi.append(x - y)
	p.sort()
	mi.sort()
	m = float('inf')
	for i in range(1, n):
		if p[i] - p[i - 1] < m:
			m = p[i] - p[i - 1]
		if mi[i] - mi[i - 1] < m:
			m = mi[i] - mi[i - 1]
	if m % 2 == 0:
		print(m // 2)
	else:
		print(m / 2)


import math
for _ in range(0, int(input())):
	points = int(input())
	xs = set()
	ys = set()
	for _ in range(points):
		(x, y) = [int(i) for i in input().split()]
		xs.add(x - y)
		ys.add(x + y)
	xmin = 1000000001
	ymin = 1000000001
	if len(xs) != points or len(ys) != points:
		print(0)
	else:
		xs = sorted(xs)
		ys = sorted(ys)
		xmin = math.fabs(xs[1] - xs[0])
		ymin = math.fabs(ys[1] - ys[0])
		for i in range(1, len(xs) - 1):
			if xmin > math.fabs(xs[i + 1] - xs[i]):
				xmin = xs[i + 1] - xs[i]
			if ymin > math.fabs(ys[i + 1] - ys[i]):
				ymin = ys[i + 1] - ys[i]
		print(min(xmin, ymin) / 2)


def printPairs(array, n):
	if n <= 1:
		return
	minDiff = array[1] - array[0]
	for i in range(2, n):
		minDiff = min(minDiff, array[i] - array[i - 1])
	return minDiff
t = int(input())
for _ in range(t):
	n = int(input())
	setx = set()
	sety = set()
	for i in range(n):
		(aa, bb) = [int(i) for i in input().split()]
		sety.add(bb + aa)
		setx.add(aa - bb)
	if len(list(setx)) != n:
		print(0)
	elif len(list(sety)) != n:
		print(0)
	else:
		sortedx = sorted(list(setx))
		sortedy = sorted(list(sety))
		xdiff = printPairs(sortedx, len(sortedx))
		ydiff = printPairs(sortedy, len(sortedy))
		xx = min(xdiff, ydiff)
		print(xx / 2)


for _ in range(int(input())):
	n = int(input())
	nipun = []
	singla = []
	for i in range(n):
		(p, q) = map(int, input().split())
		c1 = p - q
		c2 = -(p + q)
		nipun.append(c1)
		singla.append(c2)
	nipun.sort()
	singla.sort()
	nipun1 = []
	singla1 = []
	for i in range(n - 1):
		maxi1 = abs(nipun[i] - nipun[i + 1])
		maxi2 = abs(singla[i] - singla[i + 1])
		nipun1.append(maxi1)
		singla1.append(maxi2)
	count = 0
	for i in range(n - 1):
		if nipun1[i] == 0 or singla1[i] == 0:
			count = 1
			break
	if count == 1:
		print('0')
	else:
		max3 = min(nipun1)
		max4 = min(singla1)
		if max3 < max4:
			print(max3 / 2)
		else:
			print(max4 / 2)


T = int(input())
for a in range(T):
	N = int(input())
	x = [0] * N
	y = [0] * N
	lsum = [0] * N
	lsub = [0] * N
	for l in range(N):
		[x[l], y[l]] = (int(i) for i in input().split())
		lsum[l] = x[l] + y[l]
		lsub[l] = x[l] - y[l]
	lsum.sort()
	lsub.sort()
	flag = 0
	minsum = float('inf')
	minsub = float('inf')
	for f in range(N - 1):
		if abs(lsum[f + 1] - lsum[f]) < minsum:
			minsum = abs(lsum[f + 1] - lsum[f])
			if minsum == 0:
				flag = 1
				break
	for f in range(N - 1):
		if abs(lsub[f + 1] - lsub[f]) < minsub:
			minsub = abs(lsub[f + 1] - lsub[f])
			if minsub == 0:
				flag = 1
				break
	if flag == 1:
		print(0)
	else:
		temp = min(minsub, minsum)
		ans = temp / 2
		print(ans)


t = int(input())
for i in range(0, t):
	n = int(input())
	arr = []
	brr = []
	for j in range(0, n):
		(x, y) = input().split()
		x = int(x)
		y = int(y)
		arr.insert(0, x - y)
		brr.insert(0, x + y)
	arr.sort()
	brr.sort()
	m1 = arr[1] - arr[0]
	for k in range(1, n - 1):
		if arr[k + 1] - arr[k] < m1:
			m1 = arr[k + 1] - arr[k]
	m2 = brr[1] - brr[0]
	for k in range(1, n - 1):
		if brr[k + 1] - brr[k] < m2:
			m2 = brr[k + 1] - brr[k]
	if min(m1, m2) % 2 == 0:
		print(min(m1, m2) // 2)
	else:
		print(min(m1, m2) / 2)


from math import sqrt
x = int(input())
dist = float('inf')
for i in range(x):
	y = int(input())
	first = []
	second = []
	for j in range(y):
		t = list(map(float, input().split()))
		x = t[0]
		y = t[1]
		first.append((x - y) / sqrt(2))
		second.append((x + y) / sqrt(2))
	first.sort()
	second.sort()
	count = 0
	temp1 = dist
	temp2 = dist
	for i in range(len(first) - 1):
		if first[i] == first[i + 1]:
			count += 1
		if second[i] == second[i + 1]:
			count += 1
		l = abs(first[i] - first[i + 1])
		if l < temp1:
			temp1 = l
		m = abs(second[i] - second[i + 1])
		if m < temp2:
			temp2 = m
	res = min(temp2, temp1)
	if count > 0:
		print(0)
	else:
		print(res / 2 * sqrt(2))


T = int(input())
for a in range(T):
	N = int(input())
	res_points_1 = []
	res_points_2 = []
	min_dist = 10 ** 16
	for b in range(N):
		(x, y) = list(map(int, input().split()))
		res_points_1.append(x - y)
		res_points_2.append(x + y)
	res_points_1.sort()
	res_points_2.sort()
	for c in range(N - 1):
		dist_1 = res_points_1[c + 1] - res_points_1[c]
		dist_2 = res_points_2[c + 1] - res_points_2[c]
		min_dist = min(dist_1, dist_2, min_dist)
	if min_dist % 2 == 0:
		print(int(min_dist / 2))
	else:
		print(min_dist / 2)


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg
mm = 1000000007
yp = 0

def solve():
	t = nu()
	for _ in range(t):
		n = nu()
		x = set()
		y = set()
		fl = False
		for i in range(n):
			(l, r) = num()
			px = l + r
			py = r - l
			if px in x:
				fl = True
			if py in y:
				fl = True
			x.add(px)
			y.add(py)
		x = list(x)
		y = list(y)
		x.sort()
		y.sort()
		mnx = 9999999999999
		mny = 9999999999999
		if fl:
			print(0)
		else:
			for i in range(1, len(x)):
				mnx = min(mnx, x[i] - x[i - 1])
			for i in range(1, len(y)):
				mny = min(mny, y[i] - y[i - 1])
			print(min(mny, mnx) / 2)
solve()


t = int(input())
for i in range(t):
	n = int(input())
	x_s = set()
	y_s = set()
	for i in range(n):
		(x, y) = map(int, input().split())
		x_s.add(x - y)
		y_s.add(x + y)
	if len(x_s) != n or len(y_s) != n:
		print(0)
	else:
		lx = sorted(list(x_s))
		ly = sorted(list(y_s))
		xmin = (lx[1] - lx[0]) / 2
		ymin = (ly[1] - ly[0]) / 2
		for i in range(n - 1):
			if (lx[i + 1] - lx[i]) / 2 < xmin:
				xmin = (lx[i + 1] - lx[i]) / 2
			if (ly[i + 1] - ly[i]) / 2 < ymin:
				ymin = (ly[i + 1] - ly[i]) / 2
		print(min(xmin, ymin))


import math
for _ in range(int(input())):
	smartn = list()
	smartp = list()
	n = int(input())
	for i in range(n):
		(x, y) = map(int, input().split())
		c1 = x + y
		c2 = x - y
		smartn.append(c2)
		smartp.append(c1)
	smartp.sort()
	smartn.sort()
	mn = math.inf
	for i in range(n - 1):
		mn = min(mn, smartn[i + 1] - smartn[i])
		mn = min(mn, smartp[i + 1] - smartp[i])
	if mn:
		print(mn / 2)
	else:
		print(mn)


import io, sys, os
import math as ma
from decimal import Decimal as dec
from itertools import permutations

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())

def solve():
	t = nu()
	for _ in range(t):
		n = nu()
		x = set()
		y = set()
		fl = False
		for i in range(n):
			(l, r) = num()
			px = l + r
			py = r - l
			if px in x:
				fl = True
			if py in y:
				fl = True
			x.add(px)
			y.add(py)
		x = list(x)
		y = list(y)
		x.sort()
		y.sort()
		mnx = 9999999999999
		mny = 9999999999999
		if fl:
			print(0)
		else:
			for i in range(1, len(x)):
				mnx = min(mnx, x[i] - x[i - 1])
			for i in range(1, len(y)):
				mny = min(mny, y[i] - y[i - 1])
			print(min(mny, mnx) / 2)

def __starting_point():
	solve()
__starting_point()


import numpy as np
t = int(input())
while t:
	n = int(input())
	X = []
	Y = []
	for i in range(n):
		(x, y) = map(int, input().split())
		(x, y) = (x - y, x + y)
		X.append(x)
		Y.append(y)
	X = set(X)
	Y = set(Y)
	if len(X) == n - 1 or len(Y) == n - 1:
		print(0)
	else:
		X = list(X)
		Y = list(Y)
		X.sort()
		Y.sort()
		for i in range(len(X) - 1):
			X[i] = X[i + 1] - X[i]
		X = X[:-1]
		for i in range(len(Y) - 1):
			Y[i] = Y[i + 1] - Y[i]
		Y = Y[:-1]
		print(min(min(X) / 2.0, min(Y) / 2.0))
	t -= 1


t = int(input())
while t:
	v = int(input())
	L1 = []
	Lp = []
	Ln = []
	Lpd = []
	Lnd = []
	for i in range(0, v):
		(m, n) = map(int, input().split())
		L1.append(m)
		L1.append(n)
	for i in range(0, v * 2, 2):
		x = L1[i]
		y = L1[i + 1]
		m = 1
		Lp.append(y - m * x)
		m = -1
		Ln.append(y - m * x)
	Ln.sort()
	Lp.sort()
	for k in range(0, v - 1):
		Lpd.append(abs(Lp[k + 1] - Lp[k]))
		Lnd.append(abs(Ln[k + 1] - Ln[k]))
	Lpd.sort()
	Lnd.sort()
	if Lpd[0] == 0 or Lnd[0] == 0:
		print(0)
	elif Lpd[0] < Lnd[0]:
		print(Lpd[0] / 2)
	elif Lnd[0] < Lpd[0]:
		print(Lnd[0] / 2)
	else:
		print(Lpd[0] / 2)
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	v1 = []
	v2 = []
	for i in range(n):
		(a, b) = map(int, input().split())
		c1 = a - b
		c2 = -(a + b)
		v1.append(c1)
		v2.append(c2)
	v1.sort()
	v2.sort()
	v3 = []
	v4 = []
	for i in range(n - 1):
		maxi1 = abs(v1[i] - v1[i + 1])
		maxi2 = abs(v2[i] - v2[i + 1])
		v3.append(maxi1)
		v4.append(maxi2)
	count = 0
	for i in range(n - 1):
		if v3[i] == 0 or v4[i] == 0:
			count = 1
			break
	if count == 1:
		print('0')
	else:
		max3 = min(v3)
		max4 = min(v4)
		if max3 < max4:
			print(max3 / 2)
		else:
			print(max4 / 2)


from math import sqrt, atan, sin

def distance(i, j):
	try:
		slope = (i[1] - j[1]) / (i[0] - j[0])
		if slope < 0:
			return sin(atan(abs((-1 - slope) / (1 - slope)))) * sqrt((i[0] - j[0]) ** 2 + (i[1] - j[1]) ** 2) / 2
		else:
			return sin(atan(abs((1 - slope) / (1 + slope)))) * sqrt((i[0] - j[0]) ** 2 + (i[1] - j[1]) ** 2) / 2
	except ZeroDivisionError:
		return (i[1] - j[1]) / 2 ** 1.5

def key_find(x):
	return x[2]
test_case = int(input())
while test_case > 0:
	n = int(input())
	points = list()
	for i in range(n):
		points.append([int(i) for i in input().split()])
	diff_x_y = list()
	diff_y_x = list()
	for i in range(n):
		diff_x_y.append(tuple([points[i][0], points[i][1], points[i][0] - points[i][1]]))
		diff_y_x.append(tuple([points[i][0], points[i][1], points[i][0] + points[i][1]]))
	diff_x_y.sort(key=key_find)
	diff_y_x.sort(key=key_find)
	mini_list1 = list()
	mini_list2 = list()
	for i in range(n - 1):
		mini_list1.append(tuple([diff_x_y[i][:2], diff_x_y[i + 1][:2], diff_x_y[i + 1][2] - diff_x_y[i][2]]))
		mini_list2.append(tuple([diff_y_x[i][:2], diff_y_x[i + 1][:2], diff_y_x[i + 1][2] - diff_y_x[i][2]]))
	first_min = min(mini_list1, key=key_find)
	second_min = min(mini_list2, key=key_find)
	if first_min[2] == 0 or second_min[2] == 0:
		print(0)
	elif first_min[2] < second_min[2]:
		print(round(abs(distance(first_min[0][:2], first_min[1][:2])) * 2 ** 0.5, 6))
	else:
		print(round(abs(distance(second_min[0][:2], second_min[1][:2])) * 2 ** 0.5, 6))
	test_case -= 1


import math

def fun2(paramfun1, n):
	if n <= 1:
		return
	fun2param = paramfun1[1] - paramfun1[0]
	for i in range(2, n):
		fun2param = min(fun2param, paramfun1[i] - paramfun1[i - 1])
	for i in range(1, n):
		if paramfun1[i] - paramfun1[i - 1] == fun2param:
			return (paramfun1[i - 1], paramfun1[i])

def fun1(param1, param2):
	(x, y) = param1
	qx = 1 / 2 ** 0.5 * x - 1 / 2 ** 0.5 * y
	qy = 1 / 2 ** 0.5 * x + 1 / 2 ** 0.5 * y
	return (round(qx, 7), round(qy, 7))
for _ in range(int(input())):
	n = int(input())
	par1 = set()
	par2 = set()
	xxx = math.radians(45)
	for i in range(n):
		(a, b) = [int(i) for i in input().split()]
		(a, b) = fun1((a, b), xxx)
		par1.add(a)
		par2.add(b)
	if len(list(par1)) != n or len(list(par2)) != n:
		print(0)
	else:
		par1 = sorted(list(par1))
		par2 = sorted(list(par2))
		(x1, x2) = fun2(par1, len(par1))
		(y1, y2) = fun2(par2, len(par2))
		if abs(x1 - x2) > abs(y1 - y2):
			print(round(abs(y1 - y2) / 2 * math.sqrt(2), 7))
		else:
			print(round(abs(x1 - x2) / 2 * math.sqrt(2), 7))


from itertools import combinations

def minans(arr, n):
	minv = 10 ** 12
	for i in range(n - 1):
		if arr[i + 1] - arr[i] < minv:
			minv = arr[i + 1] - arr[i]
	return minv
t = int(input())
for i in range(t):
	n = int(input())
	l1 = []
	l2 = []
	for j in range(n):
		s = input().split(' ')
		x = int(s[0])
		y = int(s[1])
		t1 = (x - y) / 2
		t2 = (x + y) / 2
		l1.append(t1)
		l2.append(t2)
	l1 = sorted(l1)
	l2 = sorted(l2)
	minv = min(minans(l1, n), minans(l2, n))
	if minv.is_integer():
		print(int(minv))
	else:
		print(minv)


import math
import operator
root2 = math.sqrt(2)

def sign(x, y, coeff):
	if y + coeff * x > 0:
		return 1
	else:
		return -1

def dist(x, y):
	dist1 = abs(x + y) / root2
	dist2 = abs(y - x) / root2
	sign1 = sign(x, y, 1)
	sign2 = sign(x, y, -1)
	return [sign1 * dist1, sign2 * dist2]
for _ in range(int(input())):
	min1 = 10 ** 9 + 7
	min2 = min1
	n = int(input())
	l = []
	distpos = []
	distneg = []
	for v in range(n):
		(x, y) = [float(num) for num in input().split()]
		l.append([x, y])
		k = dist(x, y)
		distpos.append(k[0])
		distneg.append(k[1])
	a1 = []
	a2 = []
	distpos.sort()
	distneg.sort()
	for j in range(n - 1):
		if min1 > abs(distpos[j + 1] - distpos[j]):
			min1 = abs(distpos[j + 1] - distpos[j])
		if min2 > distneg[j + 1] - distneg[j]:
			min2 = abs(distneg[j + 1] - distneg[j])
	minval = min(min1, min2)
	val = minval / 2 * root2
	if val == 0.0:
		print(0)
	else:
		print(val)


import math
test = eval(input())
for k in range(test):
	n = eval(input())
	(x, y) = ([], [])
	dictfirst = {}
	dictsecond = {}
	varcheck1 = False
	varcheck2 = False
	for p in range(n):
		points = list(map(float, input().split(' ')))
		x.append(points[0])
		y.append(points[1])
	for p in range(n):
		keyfirst = y[p] - x[p]
		keysecond = y[p] + x[p]
		if keyfirst in dictfirst:
			dictfirst[keyfirst] = dictfirst[keyfirst] + 1
			varcheck1 = True
		else:
			dictfirst[keyfirst] = 1
		if keysecond in dictsecond:
			dictsecond[keysecond] = dictsecond[keysecond] + 1
			varcheck2 = True
		else:
			dictsecond[keysecond] = 1
	if varcheck1 or varcheck2:
		print(0)
		continue
	listx = []
	listy = []
	for r in range(n):
		listx.append(x[r] - y[r])
		listy.append(x[r] + y[r])
	listx.sort()
	listy.sort()
	var1 = 8000000000
	var2 = 8000000000
	for j1 in range(1, n):
		if listx[j1] - listx[j1 - 1] < var1:
			var1 = listx[j1] - listx[j1 - 1]
	for j2 in range(1, n):
		if listy[j2] - listy[j2 - 1] < var2:
			var2 = listy[j2] - listy[j2 - 1]
	print(min(var1, var2) / 2)


for _ in range(int(input())):
	n = int(input())
	plus = []
	minus = []
	for i in range(n):
		(x, y) = list(map(int, input().split()))
		plus.append(x + y)
		minus.append(x - y)
	(plus.sort(), minus.sort())
	m = float('inf')
	for i in range(1, n):
		if plus[i] - plus[i - 1] < m:
			m = plus[i] - plus[i - 1]
		if minus[i] - minus[i - 1] < m:
			m = minus[i] - minus[i - 1]
	if m % 2 == 0:
		print(m // 2)
	else:
		print(m / 2)


t = int(input())
for i in range(0, t):
	n = int(input())
	c_pos = []
	c_neg = []
	for j in range(0, n):
		m = input().split()
		c_pos.append(int(m[1]) + int(m[0]))
		c_neg.append(int(m[1]) - int(m[0]))
	c_pos.sort()
	c_neg.sort()
	min = c_neg[1] - c_neg[0]
	for j in range(n - 1):
		if min > c_pos[j + 1] - c_pos[j]:
			min = c_pos[j + 1] - c_pos[j]
		if min > c_neg[j + 1] - c_neg[j]:
			min = c_neg[j + 1] - c_neg[j]
		if min == 0:
			break
	if min == 0:
		print(0)
	else:
		print(min / 2)


from math import sqrt, atan, sin, pow
from sys import maxsize

class WTBTR:

	def __init__(self, t):
		self.t = t

	@staticmethod
	def distance(i, j):
		try:
			slope = (i[1] - j[1]) / (i[0] - j[0])
			if slope == 1 or slope == -1:
				return 0
			elif slope < 0:
				return sin(atan(abs((-1 - slope) / (1 - slope)))) * sqrt((i[0] - j[0]) ** 2 + (i[1] - j[1]) ** 2) / 2
			elif slope > 0:
				return sin(atan(abs((1 - slope) / (1 + slope)))) * sqrt((i[0] - j[0]) ** 2 + (i[1] - j[1]) ** 2) / 2
			else:
				return (i[0] - j[0]) / 2 ** 1.5
		except ZeroDivisionError:
			return (i[1] - j[1]) / 2 ** 1.5

	def main(self):
		while self.t > 0:
			self.t -= 1
			n = int(input())
			c = [list(map(int, input().split())) for i in range(n)]
			xy = [tuple([c[i][0], c[i][1], c[i][0] - c[i][1]]) for i in range(n)]
			yx = [tuple([c[i][0], c[i][1], c[i][1] + c[i][0]]) for i in range(n)]
			xy.sort(key=lambda x: x[2])
			yx.sort(key=lambda x: x[2])
			temp1 = [(xy[i][:2], xy[i + 1][:2], xy[i + 1][2] - xy[i][2]) for i in range(n - 1)]
			temp2 = [(yx[i][:2], yx[i + 1][:2], yx[i + 1][2] - yx[i][2]) for i in range(n - 1)]
			minimum1 = min(temp1, key=lambda x: x[2])
			minimum2 = min(temp2, key=lambda x: x[2])
			if minimum1[2] == 0 or minimum2[2] == 0:
				print(0)
			elif minimum1[2] <= minimum2[2]:
				print(round(abs(self.distance(minimum1[0][:2], minimum1[1][:2])) * 2 ** 0.5, 6))
			else:
				print(round(abs(self.distance(minimum2[0][:2], minimum2[1][:2])) * 2 ** 0.5, 6))
a = WTBTR(int(input()))
a.main()


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	(mp, mn) = ([], [])
	for i in range(n):
		(x, y) = list(map(int, input().split()))
		mp.append(y - x)
		mn.append(y + x)
	dmin = abs(mp[1] - mp[0])
	mp.sort()
	mn.sort()
	for i in range(n - 1):
		dmin = min(dmin, mp[i + 1] - mp[i])
		dmin = min(dmin, mn[i + 1] - mn[i])
	if dmin % 2 == 0:
		print(dmin // 2)
	else:
		print(dmin / 2)


for _ in range(int(input())):
	n = int(input())
	xset = set()
	yset = set()
	for i in range(n):
		(c, d) = [int(i) for i in input().split()]
		xset.add(c - d)
		yset.add(c + d)
	xmin = 100
	if len(list(xset)) != n or len(list(yset)) != n:
		print(0)
	else:
		xset = sorted(list(xset))
		yset = sorted(list(yset))
		xmin = xset[1] - xset[0]
		ymin = yset[1] - yset[0]
		for i in range(0, len(xset) - 1):
			if xmin > xset[i + 1] - xset[i]:
				xmin = xset[i + 1] - xset[i]
			if ymin > yset[i + 1] - yset[i]:
				ymin = yset[i + 1] - yset[i]
		print(min(xmin, ymin) / 2)


t = int(input())
for test in range(t):
	n = int(input())
	a_set = set()
	b_set = set()
	for i in range(n):
		(x, y) = list(map(int, input().split()))
		a_set.add(x - y)
		b_set.add(x + y)
	a_set = list(a_set)
	b_set = list(b_set)
	if len(a_set) != n or len(b_set) != n:
		print(0)
	else:
		a_set = sorted(a_set)
		b_set = sorted(b_set)
		a1 = a_set[1] - a_set[0]
		b1 = b_set[1] - b_set[0]
		for i in range(2, n):
			a1 = min(a1, a_set[i] - a_set[i - 1])
			b1 = min(b1, b_set[i] - b_set[i - 1])
		print(min(a1, b1) / 2)


from decimal import *
getcontext().prec = 1
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = []
	i = 0
	b = []
	while i < n:
		(x, y) = map(int, input().split())
		a.append(x + y)
		b.append(x - y)
		i += 1
	a.sort()
	b.sort()
	m = 1000000007
	for i in range(1, n):
		k = abs(a[i] - a[i - 1])
		l = abs(b[i] - b[i - 1])
		m = min(m, k, l)
	print(Decimal(m / 2))


def findMinDiff(arr, n):
	diff = 10 ** 20
	pos = 0
	for i in range(n - 1):
		if arr[i + 1] - arr[i] < diff:
			diff = arr[i + 1] - arr[i]
			pos = i
	return diff
t = int(input())
for i in range(t):
	n = int(input())
	l1 = list()
	l2 = list()
	for j in range(n):
		(x, y) = map(int, input().split())
		l1.append(x + y)
		l2.append(x - y)
	l1.sort()
	l2.sort()
	d1 = findMinDiff(l1, n)
	d2 = findMinDiff(l2, n)
	df = min(d1, d2)
	if df == 0:
		print(0)
	else:
		print(abs(df) / 2)


import bisect
ans = []
test = int(input())
for x in range(test):
	n = int(input())
	line = []
	for l in range(n):
		on = []
		li = input()
		li = list(map(int, li.split(' ')))
		on.append(-li[0] + li[1])
		on.append(-li[0] - li[1])
		line.append(on)
	list1 = []
	list2 = []
	mini = 1
	i = 0
	for j in range(i + 1, n):
		dist1 = line[i][0] - line[j][0]
		dist2 = line[i][1] - line[j][1]
		if dist1 == 0 or dist2 == 0:
			mini = 0
			break
		else:
			list1.append(dist1)
			list2.append(dist2)
	if not mini:
		ans.append(float(mini))
	elif n == 2:
		mini = min(abs(list1[0]), abs(list2[0]))
		ans.append(float(mini) / 2)
	else:
		list1.sort()
		list2.sort()
		mini = list1[1] - list1[0]
		for i in range(1, n - 1):
			val1 = abs(list1[i] - list1[i - 1])
			val2 = abs(list2[i] - list2[i - 1])
			val = min(val1, val2, abs(list1[i - 1]), abs(list2[i - 1]))
			if val < mini:
				mini = val
		mini = min(abs(list1[n - 2]), abs(list2[n - 2]), mini)
		ans.append(float(mini) / 2)
for x in ans:
	if x.is_integer():
		print(int(x))
	else:
		print(x)


l = int(input())
for k in range(l):
	t = int(input())
	c = []
	cx = []
	mi = []
	count = 0
	for i in range(t):
		z = input()
		z = list(map(int, z.split()))
		cons = z[1] - z[0]
		con = z[0] + z[1]
		c.append(cons)
		cx.append(con)
	c.sort()
	cx.sort()
	le = len(c)
	for j in range(le - 1):
		if c[j] != c[j + 1] and cx[j] != cx[j + 1]:
			mi.append(abs(c[j] - c[j + 1]))
			mi.append(abs(cx[j] - cx[j + 1]))
		else:
			count += 1
			break
	if count == 0:
		print(min(mi) / 2)
	else:
		print(0)


import math
t = int(input())
for x in range(t):
	n = int(input())
	cordno = []
	cordpo = []
	no = []
	po = []
	for y in range(n):
		(a, b) = map(int, input().split())
		cordno.append([a, b, a + b])
		cordpo.append([a, b, b - a])
		no.append(a + b)
		po.append(b - a)
	cordno.sort(key=lambda x: x[2])
	cordpo.sort(key=lambda x: x[2])
	if len(set(no)) != n or len(set(po)) != n:
		print(0)
		continue
	for y in range(n - 1):
		c1 = float((cordno[y][0] + cordno[y + 1][0]) / 2) + float((cordno[y][1] + cordno[y + 1][1]) / 2)
		c2 = float((cordpo[y][0] + cordpo[y + 1][0]) / 2) - float((cordpo[y][1] + cordpo[y + 1][1]) / 2)
		if y == 0:
			m1 = abs(float(cordno[y][0] + cordno[y][1] - c1))
			m2 = abs(float(cordpo[y][1] - cordpo[y][0] + c2))
		else:
			d1 = abs(float(cordno[y][0] + cordno[y][1] - c1))
			d2 = abs(float(cordpo[y][1] - cordpo[y][0] + c2))
			if d1 < m1:
				m1 = d1
			if d2 < m2:
				m2 = d2
	print(min(m1, m2))


import math
output = []
for test_case in range(int(input())):
	n = input()
	x = []
	y = []
	flag = 0
	carr1 = []
	carr2 = []
	for entry in range(int(n)):
		arr = input().split(' ')
		x.append(int(arr[0]))
		y.append(int(arr[1]))
		carr1.append(int(arr[1]) - int(arr[0]))
		carr2.append(int(arr[1]) + int(arr[0]))
	carr1.sort()
	carr2.sort()
	min = math.inf
	for i in range(len(x) - 1):
		min_c1 = abs(carr1[i] - carr1[i + 1])
		min_c2 = abs(carr2[i] - carr2[i + 1])
		min_c = 0
		if min_c1 < min_c2:
			min_c = min_c1
		else:
			min_c = min_c2
		if min_c < min:
			min = min_c
	if min == 0:
		output.append(0)
	else:
		output.append(min / 2)
for o in output:
	print(o)