There are N points on the 2D plane, i-th of which is located on (x_i, y_i).
There can be multiple points that share the same coordinate.
What is the maximum possible Manhattan distance between two distinct points?
Here, the Manhattan distance between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

-----Constraints-----
 - 2 \leq N \leq 2 \times 10^5
 - 1 \leq x_i,y_i \leq 10^9
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N
x_1 y_1
x_2 y_2
:
x_N y_N

-----Output-----
Print the answer.

-----Sample Input-----
3
1 1
2 4
3 2

-----Sample Output-----
4

The Manhattan distance between the first point and the second point is |1-2|+|1-4|=4, which is maximum possible.

Difficulty: MEDIUM

Solutions:
(m, *p) = ([],)
for i in [*open(0)][1:]:
	(x, y) = map(int, i.split())
	m += (x - y,)
	p += (x + y,)
a = max
print(a(a(m) - min(m), a(p) - min(p)))


n = int(input())
z = []
w = []
for i in range(n):
	(x, y) = map(int, input().split())
	z.append(x + y)
	w.append(x - y)
print(max(abs(max(z) - min(z)), abs(max(w) - min(w))))


n = int(input())
plus = []
minus = []
for _ in range(n):
	(x, y) = map(int, input().split())
	plus.append(x + y)
	minus.append(x - y)
plus.sort()
minus.sort()
print(max(plus[-1] - plus[0], minus[-1] - minus[0]))


n = int(input())
a = []
b = []
for _ in range(n):
	(x, y) = map(int, input().split())
	a += [x - y]
	b += [x + y]
a.sort()
b.sort()
print(max(a[-1] - a[0], b[-1] - b[0]))


N = int(input())
z = []
zz = []
for _ in range(N):
	(x, y) = map(int, input().split())
	zz.append(x - y)
	z.append(x + y)
z.sort()
zz.sort()
ans = z[-1] - z[0]
ans = max(ans, zz[-1] - zz[0])
print(ans)


((n,), *d) = [[*map(int, o.split())] for o in open(0)]
M = [[x - y for (x, y) in d], [x + y for (x, y) in d]]
print(max((max(M[d]) - min(M[d]) for d in [0, 1])))


N = int(input())
x = [0 for _ in range(N)]
y = [0 for _ in range(N)]
for i in range(N):
	(x[i], y[i]) = map(int, input().split())
X = [0 for _ in range(N)]
Y = [0 for _ in range(N)]
for i in range(N):
	(X[i], Y[i]) = (x[i] - y[i], x[i] + y[i])
ans = 0
ans = max(max(X) - min(X), max(Y) - min(Y))
print(ans)


N = int(input())
L = [list(map(int, input().split())) for i in range(N)]
zmax = zmin = L[0][0] + L[0][1]
wmax = wmin = L[0][0] - L[0][1]
for (a, b) in L:
	(z, w) = (a + b, a - b)
	zmax = max(zmax, z)
	zmin = min(zmin, z)
	wmax = max(wmax, w)
	wmin = min(wmin, w)
print(max(zmax - zmin, wmax - wmin))


N = int(input())
A = []
B = []
for i in range(N):
	(a, b) = map(int, input().split())
	A.append(a + b)
	B.append(a - b)
A.sort()
B.sort()
ans = max(A[-1] - A[0], B[-1] - B[0])
print(ans)


N = int(input())
ls = []
lt = []
for _ in range(N):
	(x, y) = map(int, input().split())
	s = x + y
	t = x - y
	ls.append(s)
	lt.append(t)
print(max(max(ls) - min(ls), max(lt) - min(lt)))


n = int(input())
(zl, wl) = ([], [])
for i in range(n):
	(x, y) = map(int, input().split())
	z = x + y
	w = x - y
	zl.append(z)
	wl.append(w)
zl.sort()
wl.sort()
print(max(zl[-1] - zl[0], wl[-1] - wl[0]))


N = int(input())
u = []
v = []
for _ in range(N):
	(x, y) = map(int, input().split())
	u.append(x + y)
	v.append(x - y)
umax = max(u)
umin = min(u)
vmax = max(v)
vmin = min(v)
print(max(umax - umin, vmax - vmin))


def main():
	n = int(input())
	pt = []
	for _ in range(n):
		(x, y) = map(int, input().split())
		pt.append([x, y])
	(a, b, c) = ([], [], [])
	for p in pt:
		a.append(p[0] + p[1])
		b.append(p[0] - p[1])
		c.append(p[1] - p[0])
	ans = 0
	if max(a) - min(a) > ans:
		ans = max(a) - min(a)
	if max(b) - min(b) > ans:
		ans = max(b) - min(b)
	if max(c) - min(c) > ans:
		ans = max(c) - min(c)
	print(ans)

def __starting_point():
	main()
__starting_point()


N = int(input())
z = [None] * N
w = [None] * N
for i in range(N):
	(x, y) = map(int, input().split())
	z[i] = x + y
	w[i] = x - y
print(max(max(z) - min(z), max(w) - min(w)))


N = int(input())
xy = []
(d0, d1) = ([], [])
for _ in range(N):
	(x, y) = map(int, input().split())
	d0.append(x - y)
	d1.append(x + y)
print(max(max(d0) - min(d0), max(d1) - min(d1)))


n = int(input())
u = []
v = []
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	u.append(x + y)
	v.append(x - y)
ans = max(max(u) - min(u), max(v) - min(v))
print(ans)


def get_points_and_convert(pts):
	(x, y) = pts
	return (x + y, x - y)

def main():
	n = int(input())
	points = [get_points_and_convert(list(map(int, input().split()))) for _ in range(n)]
	(plus_coords, minus_coords) = list(zip(*points))
	plus_dist = max(plus_coords) - min(plus_coords)
	minus_dist = max(minus_coords) - min(minus_coords)
	print(max(plus_dist, minus_dist))

def __starting_point():
	main()
__starting_point()


N = int(input())
A = [list(map(int, input().split(' '))) for i in range(N)]
hoge = [sum(a) for a in A]
fuga = [a[0] - a[1] for a in A]
print(max(max(hoge) - min(hoge), max(fuga) - min(fuga)))


N = int(input())
xy = [tuple(map(int, input().split())) for _ in range(N)]
z = []
w = []
for (x, y) in xy:
	z.append(x + y)
	w.append(x - y)
print(max(max(z) - min(z), max(w) - min(w)))


import sys
from operator import itemgetter
N = int(input())
V = set()
for s in sys.stdin.readlines():
	(x, y) = list(map(int, s.split()))
	V.add((x + y, x - y))
y_max = max(V, key=itemgetter(1))[1]
y_min = min(V, key=itemgetter(1))[1]
x_max = max(V, key=itemgetter(0))[0]
x_min = min(V, key=itemgetter(0))[0]
print(max(x_max - x_min, y_max - y_min))


n = int(input())
p = [list(map(int, input().split())) for _ in range(n)]
q = [[x + y, x - y] for (x, y) in p]
print(max(max(q)[0] - min(q)[0], max(q, key=lambda x: x[1])[1] - min(q, key=lambda x: x[1])[1]))


n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]
L1 = [i[0] + i[1] for i in xy]
L2 = [i[0] - i[1] for i in xy]
m1 = max(L1) - min(L1)
m2 = max(L2) - min(L2)
print(max(m1, m2))


n = int(input())
xy = [list(map(int, input().split())) for _i in range(n)]
x = [i + j for (i, j) in xy]
y = [i - j for (i, j) in xy]
x.sort()
y.sort()
print(max(abs(x[0] - x[-1]), abs(y[0] - y[-1])))


n = int(input())
min_u = float('inf')
max_u = -float('inf')
min_v = float('inf')
max_v = -float('inf')
for i in range(n):
	(x, y) = list(map(int, input().split()))
	(u, v) = (x + y, x - y)
	if u <= min_u:
		min_u = u
	if u >= max_u:
		max_u = u
	if v <= min_v:
		min_v = v
	if v >= max_v:
		max_v = v
print(max(max_u - min_u, max_v - min_v))


N = int(input())
X = [0] * N
Y = [0] * N
for TN in range(0, N):
	(A, B) = (int(T) for T in input().split())
	X[TN] = A - B
	Y[TN] = A + B
print(max(max(X) - min(X), max(Y) - min(Y)))


import numpy as np

def solve(n, x, y):
	x = np.asarray(x)
	y = np.asarray(y)
	z = x + y
	w = x - y
	return max(np.max(z) - np.min(z), np.max(w) - np.min(w))
n = int(input())
(x, y) = list(zip(*[list(map(int, input().split())) for i in range(n)]))
print(solve(n, x, y))


N = int(input())
W = []
S = []
for _ in range(N):
	(x, y) = [int(hoge) for hoge in input().split()]
	wa = x + y
	sa = x - y
	W.append(wa)
	S.append(sa)
T = max(W) - min(W)
Y = max(S) - min(S)
print(max(T, Y))


n = int(input())
zp = []
zl = []
for i in range(n):
	(a, b) = map(int, input().split())
	zp.append(a + b)
	zl.append(a - b)
ans = max(max(zp) - min(zp), max(zl) - min(zl))
print(ans)


n = int(input())
a = []
b = []
for i in range(n):
	(x, y) = (int(i) for i in input().split())
	a.append(x - y)
	b.append(x + y)
a.sort()
b.sort()
print(max(a[-1] - a[0], b[-1] - b[0]))


N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
	(a, b) = map(int, input().split())
	x[i] = a + b
	y[i] = a - b
xmax = max(x)
xmin = min(x)
ymax = max(y)
ymin = min(y)
print(max(xmax - xmin, ymax - ymin))


N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
f0 = []
f1 = []
for i in XY:
	f0.append(i[0] - i[1])
	f1.append(i[0] + i[1])
print(max(max(f0) - min(f0), max(f1) - min(f1)))


n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
a = 10 ** 9
z_max = -1 * a
z_min = a
w_max = -1 * a
w_min = a
for (x, y) in l:
	z_max = max(z_max, x + y)
	z_min = min(z_min, x + y)
	w_max = max(w_max, x - y)
	w_min = min(w_min, x - y)
print(max(z_max - z_min, w_max - w_min))


n = int(input())
xy = [list(map(int, input().split())) for i in range(n)]
z = list(map(lambda x: x[0] + x[1], xy))
w = list(map(lambda x: x[0] - x[1], xy))
print(max(max(z) - min(z), max(w) - min(w)))


n = int(input())
x = [0] * n
y = [0] * n
z = []
w = []
for i in range(n):
	(x[i], y[i]) = list(map(int, input().strip().split()))
	z.append(x[i] + y[i])
	w.append(x[i] - y[i])
a = max(z) - min(z)
b = max(w) - min(w)
print(max(a, b))


N = int(input())
axis1 = []
axis2 = []
for i in range(N):
	(x, y) = map(int, input().split())
	axis1.append(x + y)
	axis2.append(x - y)
a1 = max(axis1) - min(axis1)
a2 = max(axis2) - min(axis2)
print(max(a1, a2))


N = int(input())
A = []
B = []
for i in range(N):
	(x, y) = list(map(int, input().split()))
	A.append(x + y)
	B.append(-x + y)
A.sort()
B.sort()
print(max(abs(A[0] - A[-1]), abs(B[0] - B[-1])))


N = int(input())
nodes = []
plus = []
minus = []
for i in range(N):
	(x, y) = map(int, input().split())
	nodes.append((x, y))
	plus.append(x + y)
	minus.append(x - y)
print(max(max(plus) - min(plus), max(minus) - min(minus)))


n = int(input())
a = []
b = []
for c in range(n):
	(x, y) = map(int, input().split())
	a.append(x + y)
	b.append(x - y)
s1 = max(a) - min(a)
s2 = max(b) - min(b)
print(max(s1, s2))


N = int(input())
p = [0] * N
m = [0] * N
for i in range(N):
	(x, y) = map(int, input().split())
	p[i] = x + y
	m[i] = x - y
pm = max(p) - min(p)
mm = max(m) - min(m)
print(max(pm, mm))


(n, *XY) = map(int, open(0).read().split())
XY = list(zip(XY[::2], XY[1::2]))
A = [x + y for (x, y) in XY]
B = [x - y for (x, y) in XY]
print(max(max(A) - min(A), max(B) - min(B)))


n = int(input())
x = []
y = []
for i in range(n):
	l = list(map(int, input().split()))
	x.append(l[0] + l[1])
	y.append(l[0] - l[1])
print(max(max(x) - min(x), max(y) - min(y)))


N = int(input())
xys = [list(map(int, input().split())) for _ in range(N)]
ws = [x + y for (x, y) in xys]
zs = [x - y for (x, y) in xys]
print(max([max(ws) - min(ws), max(zs) - min(zs)]))


N = int(input())
xyp = []
xym = []
for _ in range(N):
	(x, y) = map(int, input().split())
	xyp.append(x + y)
	xym.append(x - y)
xyp.sort()
xym.sort()
print(max(xyp[-1] - xyp[0], xym[-1] - xym[0]))


n = int(input())
lx = []
ly = []
for i in range(n):
	(x, y) = map(int, input().split())
	lx.append(x + y)
	ly.append(x - y)
print(max(max(lx) - min(lx), max(ly) - min(ly)))


n = int(input())
points = [tuple(map(int, input().split())) for _ in range(n)]
plus = [p[0] + p[1] for p in points]
minus = [p[0] - p[1] for p in points]
print(max(max(plus) - min(plus), max(minus) - min(minus)))


n = int(input())
zmi = wmi = int(10000000000.0)
zma = wma = int(-10000000000.0)
for i in range(n):
	(xi, yi) = list(map(int, input().split()))
	zma = max(xi + yi, zma)
	wma = max(xi - yi, wma)
	zmi = min(xi + yi, zmi)
	wmi = min(xi - yi, wmi)
print(max(zma - zmi, wma - wmi))


N = int(input())
xpy = [0] * N
xmy = [0] * N
for i in range(N):
	(x, y) = map(int, input().split())
	xpy[i] = x + y
	xmy[i] = x - y
xpy.sort()
xmy.sort()
print(max(xpy[-1] - xpy[0], xmy[-1] - xmy[0]))


N = int(input())
plus = []
minus = []
for _ in range(N):
	(x, y) = map(int, input().split())
	plus.append(x + y)
	minus.append(x - y)
print(max(max(plus) - min(plus), max(minus) - min(minus)))


N = int(input())
Z = []
W = []
for i in range(N):
	(x, y) = map(int, input().split())
	Z.append(x + y)
	W.append(x - y)
print(max(max(Z) - min(Z), max(W) - min(W)))


n = int(input())
a = []
b = []
for s in range(n):
	(x, y) = map(int, input().split())
	a.append(x + y)
	b.append(x - y)
c = max(a) - min(a)
d = max(b) - min(b)
if c < d:
	c = d
print(c)


n = int(input())
xy = [list(map(int, input().split())) for i in range(n)]
d1 = []
d2 = []
for (x, y) in xy:
	d1.append(x - y)
	d2.append(x + y)
ans1 = max(d1) - min(d1)
ans2 = max(d2) - min(d2)
print(max(ans1, ans2))


n = int(input())
xy = [tuple(map(int, input().split())) for _ in range(n)]
fn = [lambda x: x[0] + x[1], lambda x: x[0] - x[1]]
ans = 0
for f in fn:
	xy.sort(key=f)
	ans = max(ans, abs(f(xy[0]) - f(xy[-1])))
print(ans)


n = int(input())
(x, y) = ([], [])
for i in range(n):
	(xi, yi) = map(int, input().split())
	x.append(xi + yi)
	y.append(xi - yi)
x.sort()
y.sort()
ans = max(x[-1] - x[0], y[-1] - y[0])
print(ans)


N = int(input())
z = [0] * N
w = [0] * N
for n in range(N):
	(x, y) = map(int, input().split())
	z[n] = x + y
	w[n] = x - y
print(max(max(z) - min(z), max(w) - min(w)))


n = int(input())
d1 = []
d2 = []
for i in range(n):
	(x, y) = map(int, input().split())
	d1.append(x - y)
	d2.append(x + y)
one = max(d1) - min(d1)
two = max(d2) - min(d2)
print(max(one, two))


N = int(input())
axis1 = []
axis2 = []
for i in range(N):
	(x, y) = map(int, input().split())
	axis1.append(x - y)
	axis2.append(x + y)
ans1 = max(axis1) - min(axis1)
ans2 = max(axis2) - min(axis2)
print(max(ans1, ans2))


def ans():
	N = int(input())
	Z = []
	W = []
	for _ in range(N):
		(x, y) = map(int, input().split())
		Z.append(x + y)
		W.append(x - y)
	(z_max, z_min) = (max(Z), min(Z))
	(w_max, w_min) = (max(W), min(W))
	max_d = max((z_max - z_min, w_max - w_min))
	print(max_d)

def __starting_point():
	ans()
__starting_point()


n = int(input())
ad = [0] * n
su = [0] * n
for i in range(n):
	(x, y) = map(int, input().split())
	ad[i] = x + y
	su[i] = x - y
ad.sort()
su.sort()
print(max(ad[-1] - ad[0], su[-1] - su[0]))


n = int(input())
i = []
for z in range(n):
	i.append([int(s) for s in input().split()])
ur = [ind[0] + ind[1] for ind in i]
ul = [ind[0] - ind[1] for ind in i]
print(max([max(ur) - min(ur), max(ul) - min(ul)]))


n = int(input())
xy = [tuple(map(int, input().split())) for _ in range(n)]
p = [x + y for (x, y) in xy]
a1 = max(p) - min(p)
q = [x - y for (x, y) in xy]
a2 = max(q) - min(q)
print(max(a1, a2))


N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
z = [x + y for (x, y) in X]
w = [x - y for (x, y) in X]
print(max(max(z) - min(z), max(w) - min(w)))


N = int(input())
A = [0] * N
B = [0] * N
for i in range(N):
	(A[i], B[i]) = map(int, input().split())
C = [a + b for (a, b) in zip(A, B)]
D = [a - b for (a, b) in zip(A, B)]
print(max(max(C) - min(C), max(D) - min(D)))


n = int(input())
u = []
v = []
ans = 0
for i in range(n):
	(x, y) = map(int, input().split())
	u.append(x + y)
	v.append(x - y)
ans = max(max(u) - min(u), max(v) - min(v))
print(ans)


n = int(input())
s = []
m = []
for i in range(n):
	(a, b) = map(int, input().split())
	s.append(a + b)
	m.append(a - b)
print(max(max(s) - min(s), max(m) - min(m)))


n = int(input())
(s, p) = (10 ** 100, 10 ** 100)
(t, q) = (-1000000000000, -1000000000000)
for i in range(n):
	(x, y) = map(int, input().split())
	s = min(s, x + y)
	t = max(t, x + y)
	p = min(p, x - y)
	q = max(q, x - y)
print(max(t - s, q - p))


n = int(input())
disadd = []
disminus = []
for i in range(n):
	(x, y) = map(int, input().split())
	disadd.append(x + y)
	disminus.append(x - y)
print(max(max(disadd) - min(disadd), max(disminus) - min(disminus)))


n = int(input())
wa = [0] * n
sa = [0] * n
for i in range(n):
	(x, y) = map(int, input().split())
	wa[i] = x + y
	sa[i] = x - y
wanosa = max(wa) - min(wa)
sanosa = max(sa) - min(sa)
ans = max(wanosa, sanosa)
print(ans)


N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
z = [x + y for (x, y) in xy]
w = [x - y for (x, y) in xy]
z.sort()
w.sort()
ans = max(z[-1] - z[0], w[-1] - w[0])
print(ans)


l = [list(map(int, input().split())) for _ in range(int(input()))]
f = sorted([x + y for (x, y) in l])
g = sorted([x - y for (x, y) in l])
print(max(f[-1] - f[0], g[-1] - g[0]))


N = int(input())
lst = []
for i in range(N):
	lst.append(tuple(map(lambda i: int(i), input().split())))
lstP = [xy[0] + xy[1] for xy in lst]
lstM = [xy[0] - xy[1] for xy in lst]
(lstP, lstM)
z = max(lstP) - min(lstP)
w = max(lstM) - min(lstM)
print(max(z, w))


N = int(input())
i = []
j = []
for k in range(N):
	(x, y) = map(int, input().split())
	i.append(x + y)
	j.append(x - y)
print(max(max(i) - min(i), max(j) - min(j)))


n = int(input())
z = [0] * n
w = [0] * n
for i in range(n):
	(x, y) = map(int, input().split())
	z[i] = x + y
	w[i] = x - y
a = max(z)
b = min(z)
c = max(w)
d = min(w)
print(max(a - b, b - a, c - d, d - c))


n = int(input())
a = [0] * n
b = [0] * n
for i in range(n):
	(p, q) = [int(j) for j in input().split(' ')]
	a[i] = p + q
	b[i] = p - q
a.sort()
b.sort()
print(max(a[-1] - a[0], b[-1] - b[0]))


n = int(input())
xx = []
yy = []
for _ in range(n):
	(x, y) = map(int, input().split())
	xx.append(x + y)
	yy.append(x - y)
print(max(max(xx) - min(xx), max(yy) - min(yy)))


n = int(input())
xy_array = [list(map(int, input().split())) for _ in range(n)]
th = pow(10, 9)
right_up_max = -th
left_down_min = th
left_up_max = -th
right_down_min = th
for (x, y) in xy_array:
	right_up_max = max(x + y, right_up_max)
	left_down_min = min(x + y, left_down_min)
	left_up_max = max(x - y, left_up_max)
	right_down_min = min(x - y, right_down_min)
ans = max(right_up_max - left_down_min, left_up_max - right_down_min)
print(ans)


N = int(input())
x_y = [list(map(int, input().split())) for _ in range(N)]
Z = []
W = []
for l in x_y:
	Z.append(l[0] + l[1])
	W.append(l[0] - l[1])
print(max(max(Z) - min(Z), max(W) - min(W)))


n = int(input())
a = []
b = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x + y)
	b.append(x - y)
print(max(max(a) - min(a), max(b) - min(b)))


n = int(input())
xs = []
ys = []
for _ in range(n):
	(x, y) = map(int, input().split())
	xs.append(x + y)
	ys.append(x - y)
xs.sort()
ys.sort()
ans = max(xs[-1] - xs[0], ys[-1] - ys[0])
print(ans)


def manhattan(n, x, y):
	x2 = [0] * n
	y2 = [0] * n
	for i in range(n):
		x2[i] = x[i] - y[i]
		y2[i] = x[i] + y[i]
	print(max(max(x2) - min(x2), max(y2) - min(y2)))
n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
	(x[i], y[i]) = list(map(int, input().split()))
manhattan(n, x, y)


N = int(input())
P = []
for i in range(N):
	(x, y) = map(int, input().split())
	P.append([x, y])
(L, R) = ([], [])
F = 10 ** 9
for (a, b) in P:
	L.append(a + b)
	R.append(F - b + a)
print(max(max(L) - min(L), max(R) - min(R)))


N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
Z = sorted([x + y for (x, y) in A])
W = sorted([x - y for (x, y) in A])
print(max(Z[-1] - Z[0], W[-1] - W[0]))


N = int(input())
Z = [0] * N
W = [0] * N
for i in range(N):
	(x, y) = map(int, input().split())
	Z[i] = x + y
	W[i] = x - y
alpha = max(Z) - min(Z)
beta = max(W) - min(W)
print(max(alpha, beta))


sumi = []
diff = []
t = int(input())
for _ in range(t):
	z = list(map(int, input().split()))
	sumi.append(z[0] + z[1])
	diff.append(z[0] - z[1])
print(max(max(diff) - min(diff), max(sumi) - min(sumi)))


n = int(input())
Xs = []
Ys = []
for _ in range(n):
	(x, y) = map(int, input().split())
	Xs.append(x + y)
	Ys.append(x - y)
Xs.sort()
Ys.sort()
print(max(Xs[-1] - Xs[0], Ys[-1] - Ys[0]))


def main():
	n = int(input())
	(xym, xyM, x_ym, x_yM) = (10 ** 9, -10 ** 9, 10 ** 9, -10 ** 9)
	for _ in range(n):
		(x, y) = map(int, input().split())
		(xy, x_y) = (x + y, x - y)
		(xym, xyM, x_ym, x_yM) = (min(xym, xy), max(xyM, xy), min(x_ym, x_y), max(x_yM, x_y))
	print(max(xyM - xym, x_yM - x_ym))

def __starting_point():
	main()
__starting_point()


N = int(input())
xpy = []
xmy = []
for _ in range(N):
	(x, y) = map(int, input().split())
	xpy.append(x + y)
	xmy.append(x - y)
print(max(max(xpy) - min(xpy), max(xmy) - min(xmy)))


n = int(input())
arr1 = []
arr2 = []
for i in range(n):
	(x, y) = map(int, input().split())
	arr1.append(x - y)
	arr2.append(x + y)
ma2 = max(arr2) - min(arr2)
ma1 = max(arr1) - min(arr1)
print(max(ma1, ma2))


N = int(input())
xy = [list(map(int, input().split())) for i in range(N)]
z = [x + y for (x, y) in xy]
w = [x - y for (x, y) in xy]
print(max(max(z) - min(z), max(w) - min(w)))


n = int(input())
r = []
for _ in range(n):
	(a, b) = map(int, input().split())
	r.append([a + b, a - b])
r = list(zip(*r))
print(max(max(r[0]) - min(r[0]), max(r[1]) - min(r[1])))


n = int(input())
arr1 = [0] * n
arr2 = [0] * n
for i in range(n):
	(x, y) = map(int, input().split())
	arr1[i] = x + y
	arr2[i] = x - y
arr1 = sorted(arr1)
p = arr1[-1] - arr1[0]
arr2 = sorted(arr2)
q = arr2[-1] - arr2[0]
print(max(p, q))


N = int(input())
P = [tuple(map(int, input().split())) for i in range(N)]
X = [x + y for (x, y) in P]
Y = [x - y for (x, y) in P]
print(max(max(X) - min(X), max(Y) - min(Y)))


n = int(input())
XY = [tuple(map(int, input().split())) for i in range(n)]
A = [x + y for (x, y) in XY]
B = [x - y for (x, y) in XY]
print(max(max(A) - min(A), max(B) - min(B)))


n = int(input())
l1 = []
l2 = []
for _ in range(n):
	(x, y) = map(int, input().split())
	l1.append(x + y)
	l2.append(x - y)
print(max(max(l1) - min(l1), max(l2) - min(l2)))


n = int(input())
xpy = []
xmy = []
for i in range(n):
	(x, y) = map(int, input().split())
	xpy.append(x + y)
	xmy.append(x - y)
xpy.sort()
xmy.sort()
print(max(abs(xpy[0] - xpy[-1]), abs(xmy[0] - xmy[-1])))


n = int(input())
(l, l2) = ([], [])
for i in range(n):
	(x, y) = map(int, input().split())
	l.append(x + y)
	l2.append(x - y)
print(max(max(l) - min(l), max(l2) - min(l2)))


import sys
readline = sys.stdin.readline
N = int(readline())
A = []
B = []
for _ in range(N):
	(x, y) = map(int, readline().split())
	A.append(x - y)
	B.append(x + y)
print(max(max(A) - min(A), max(B) - min(B)))


N = int(input())
l0 = [[int(i) for i in input().split()] for _ in range(N)]
l1 = [0] * N
l2 = [0] * N
for (cnt, val) in enumerate(l0):
	l1[cnt] = val[0] + val[1]
	l2[cnt] = val[0] - val[1]
l1.sort()
l2.sort()
print(max(l1[-1] - l1[0], l2[-1] - l2[0]))


import numpy as np
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
xy45 = [[xy[i][0] - xy[i][1], xy[i][0] + xy[i][1]] for i in range(N)]
xy45 = np.array(xy45)
print(max(max(xy45[:, 0]) - min(xy45[:, 0]), max(xy45[:, 1]) - min(xy45[:, 1])))


N = int(input())
XY = []
for n in range(N):
	(x, y) = (int(i) for i in input().split())
	XY.append([x, y])
plus = []
minus = []
for [x, y] in XY:
	plus.append(x + y)
	minus.append(x - y)
print(max(max(plus) - min(plus), max(minus) - min(minus)))


n = int(input())
z = []
c = []
for j in range(n):
	(x1, y1) = [int(j) for j in input().split()]
	z.append(x1 + y1)
	c.append(x1 - y1)
za = max(z)
zi = min(z)
ca = max(c)
ci = min(c)
mx = max(za - zi, ca - ci)
print(mx)


N = int(input())
data1 = []
data2 = []
for i in range(N):
	(x, y) = map(int, input().split())
	data1.append(x + y)
	data2.append(y - x)
p = max(data1) - min(data1)
q = max(data2) - min(data2)
print(max(p, q))


import sys
input = sys.stdin.readline
N = int(input())
(l1, l2) = ([], [])
for _ in range(N):
	(x, y) = map(int, input().split())
	l1.append(x + y)
	l2.append(x - y)
print(max(max(l1) - min(l1), max(l2) - min(l2)))


n = int(input())
l_x = []
l_y = []
for i in range(n):
	(x, y) = map(int, input().split())
	l_x.append(x + y)
	l_y.append(x - y)
tmpx = max(l_x) - min(l_x)
tmpy = max(l_y) - min(l_y)
if tmpx > tmpy:
	print(tmpx)
else:
	print(tmpy)


n = int(input())
l = [[] for i in range(4)]
for i in range(n):
	(x, y) = list(map(int, input().split()))
	l[0].append(x + y)
	l[1].append(x - y)
	l[2].append(-x + y)
	l[3].append(-x - y)
for i in range(4):
	l[i].sort()
ans = 0
for i in range(4):
	ans = max(ans, l[i][-1] - l[i][0])
print(ans)


n = int(input())
xy_array = [list(map(int, input().split())) for _ in range(n)]
th = pow(10, 9)
z_max = -th
z_min = th
w_max = -th
w_min = th
for (x, y) in xy_array:
	z_max = max(x + y, z_max)
	z_min = min(x + y, z_min)
	w_max = max(x - y, w_max)
	w_min = min(x - y, w_min)
ans = max(z_max - z_min, w_max - w_min)
print(ans)


def main():
	n = int(input())
	(X, Y) = ([], [])
	for _ in range(n):
		(x, y) = list(map(int, input().split()))
		X.append(x + y)
		Y.append(x - y)
	X.sort()
	Y.sort()
	print(max(X[-1] - X[0], Y[-1] - Y[0]))

def __starting_point():
	main()
__starting_point()


INF = 2 ** 31
n = int(input())
f = lambda : map(int, input().split())
s = t = INF
S = T = -INF
for _ in range(n):
	(x, y) = f()
	s = min(s, x + y)
	S = max(S, x + y)
	t = min(t, x - y)
	T = max(T, x - y)
print(max(S - s, T - t))


N = int(input())
zls = [0 for _ in range(N)]
wls = [0 for _ in range(N)]
for i in range(N):
	(x, y) = [int(s) for s in input().split()]
	zls[i] = x + y
	wls[i] = x - y
print(max([max(zls) - min(zls), max(wls) - min(wls)]))


n = int(input())
ans = []
ans2 = []
for i in range(n):
	(a, b) = map(int, input().split())
	ans.append(a + b)
	ans2.append(10 ** 9 + 1 - a + b)
print(max(max(ans) - min(ans), max(ans2) - min(ans2)))


n = int(input())
xsum = []
xsub = []
for i in range(n):
	(a, b) = map(int, input().split())
	xsum.append(a + b)
	xsub.append(a - b)
result = max(max(xsum) - min(xsum), max(xsub) - min(xsub))
print(result)


N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
xy1 = [x + y for (x, y) in xy]
xy2 = [-x + y for (x, y) in xy]
ans1 = max(xy1) - min(xy1)
ans2 = max(xy2) - min(xy2)
print(max(ans1, ans2))


N = int(input())
xx = []
yy = []
for i in range(N):
	(x, y) = map(int, input().split())
	xx.append(x + y)
	yy.append(x - y)
xx.sort()
yy.sort()
print(max(xx[-1] - xx[0], yy[-1] - yy[0]))


n = int(input())
l = []
ar = []
br = []
for i in range(n):
	l.append(list(map(int, input().split())))
	ar.append(l[-1][0] + l[-1][1])
	br.append(l[-1][0] - l[-1][1])
ar.sort()
br.sort()
an = max(abs(ar[-1] - ar[0]), abs(br[-1] - br[0]))
print(an)


n = int(input())
plus = []
minus = []
for i in range(n):
	(x, y) = map(int, input().split())
	plus.append(x + y)
	minus.append(x - y)
print(max(max(plus) - min(plus), max(minus) - min(minus)))


import numpy as np
N = int(input())
x = []
y = []
xy1 = []
xy2 = []
for i in range(N):
	(a, b) = (int(t) for t in input().split())
	x.append(a)
	y.append(b)
	xy1.append(a + b)
	xy2.append(a - b)
max1 = max(xy1) - min(xy1)
max2 = max(xy2) - min(xy2)
print(max((max1, max2)))


n = int(input())
u = []
v = []
for i in range(n):
	(x, y) = map(int, input().split())
	u.append(x + y)
	v.append(x - y)
u.sort()
v.sort()
print(max(u[-1] - u[0], v[-1] - v[0]))


def solve():
	n = int(input())
	z = [0 for _ in range(n)]
	w = [0 for _ in range(n)]
	for i in range(n):
		(a, b) = list(map(int, input().split()))
		z[i] = a + b
		w[i] = a - b
	print(max(max(z) - min(z), max(w) - min(w)))

def __starting_point():
	solve()
__starting_point()


n = int(input())
u = [list(map(int, input().split())) for i in range(n)]
z = [u[i][0] + u[i][1] for i in range(n)]
w = [u[i][0] - u[i][1] for i in range(n)]
d = [max(z) - min(z), max(w) - min(w)]
print(max(d))


n = int(input())
d1 = []
d2 = []
for _ in range(n):
	(a, b) = map(int, input().split())
	d1.append(a + b)
	d2.append(a - b)
print(max(max(d1) - min(d1), max(d2) - min(d2)))


n = int(input())
pointx = []
pointy = []
for i in range(n):
	(x, y) = map(int, input().split())
	pointx.append(x - y)
	pointy.append(x + y)
print(max(max(pointx) - min(pointx), max(pointy) - min(pointy)))


n = int(input())
a = []
b = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x + y)
	b.append(x - y)
a = sorted(a)
b = sorted(b)
ans = max(a[-1] - a[0], b[-1] - b[0])
print(ans)


n = int(input())
xy = [tuple(map(int, input().split())) for _ in range(n)]
w = [xy[i][0] - xy[i][1] for i in range(n)]
z = [xy[i][0] + xy[i][1] for i in range(n)]
print(max(max(w) - min(w), max(z) - min(z)))


N = int(input())
z = []
w = []
for i in range(N):
	(x, y) = map(int, input().split())
	z.append(x + y)
	w.append(x - y)
z.sort()
w.sort()
print(max(z[-1] - z[0], w[-1] - w[0]))


N = int(input())
A = []
B = []
for i in range(N):
	(x, y) = map(int, input().split())
	a = x + y
	A.append(a)
	b = x - y
	B.append(b)
A.sort()
B.sort()
Max_A = A[-1] - A[0]
Max_B = B[-1] - B[0]
ans = max(Max_A, Max_B)
print(ans)


(n, *z) = map(int, open(0).read().split())
(a, b) = ([], [])
for (x, y) in zip(*[iter(z)] * 2):
	a += (x + y,)
	b += (x - y,)
print(max(abs(max(a) - min(a)), abs(max(b) - min(b))))


N = int(input())
A = []
B = []
for i in range(N):
	(x, y) = map(int, input().split())
	A.append(x + y)
	B.append(x - y)
a = max(A)
b = min(A)
c = max(B)
d = min(B)
ans = max(a - b, c - d)
print(ans)