peterverebics/CodeNet_Python_118 huggingface dataset:
N=int(input())
a = []
b = []
for i in range(N):
  x,y=map(int,input().split())
  a.append(abs(x+y))
  b.append(abs(x-y))
A = max(a)-min(a)
B = max(b)-min(b)
print(max(A,B))
n=int(input())
ma=2
mi=10**9
mu=2
me=10**9
for i in range(n):
    x,y=map(int,input().split())
    l=x+y
    s=-x+10**9+y
    ma=max(ma,l)
    mi=min(mi,l)
    mu=max(mu,s)
    me=min(me,s)
print(max(ma-mi,mu-me))
N = int(input())
z = []
for _ in range(N):
  x, y = list(map(int, input().split()))
  z.append([x, y])

z.sort()
mdct = 0
lx, ly = z[0]

for x, y in z:

  mdct = max(mdct, abs(x-lx) + abs(y-ly))

print(mdct)
l, m = list(), list()
for _ in range(int(input())):
    x, y = map(int, input().split())
    l.append([x, y])
    m.append([y, x])
l.sort(), m.sort()
print(max(l[-1][0]-l[0][0]+l[-1][1]-l[0][1], m[-1][0]-l[0][0]+l[-1][1]-l[0][1]))
import sys
input = sys.stdin.readline
INF = 10**18
sys.setrecursionlimit(10**6)

def li():
    return [int(x) for x in input().split()]


N = int(input())
md = []
for i in range(N):
    x, y = li()
    md.append(x + y)

maxv = max(md)
minv = min(md)

print(maxv - minv)
n=int(input())
XY=[list(map(int,input().split())) for i in range(n)]
minxy = [XY[0][0],XY[0][1]]
maxxy = [XY[0][0],XY[0][1]]
for xy in XY:
  if xy[0]+xy[1] < sum(minxy):
    minxy = xy[0],xy[1]
  if xy[0]+xy[1] > sum(maxxy):
    maxxy = xy[0],xy[1]
print(abs(minxy[0]-maxxy[0])+abs(minxy[0]-maxxy[1]))
from collections import defaultdict
dic = defaultdict(list)
N = int(input())
l = []
z = []
for _ in range(N):
    x, y = map(int, input().split())
    l.append([x, y])
    z.append(x+y)
z.sort()
ans = z[-1]-z[0]
    
for t in l:
    a = t[0]+t[1]
    dic[a].append(t)
for u in dic:
    dic[u].sort()
    b = dic[u][-1][0]-dic[u][0][0]
    ans = max(2*b,ans)
print(ans)
N=int(input())
arr=[]
for i in range(N):
    x,y=map(int,input().split())
    arr.append([x,y])
arr1=arr.copy()
arr1.sort()
arr2=arr.copy()
arr2.sort(key=lambda x:x[1])
print(max((abs(arr1[0][0]-arr1[-1][0])+abs(arr1[0][1]-arr1[-1][1])),abs(arr2[0][0]-arr2[-1][0])+abs(arr2[0][1]-arr2[-1][1])))
n = int(input())

max1 = -100
min1 = 10 ** 10
max0 = -100
min0 = 10 ** 10

for i in range(n):
    x,y = list(map(int,input().split()))
    k0 = x - y
    k1 = x + y
    if k0 > max0:
        max0 = k0
    if k0 < min0:
        min0 = k0
    if k1 > max1:
        max1 = k1
    if k1 < min1:
        min1 = k1


ans = int(max(max1-min1,max0-min0))

print(ans)
n = int(input())
arr = []
for i in range(n):
  arr.append(tuple(map(int, input().split())))
arr.sort(key = sum)
mx = 0
for i in arr[1:]:
  if mx <= abs(i[0] - arr[0][0]) + abs(i[1] - arr[0][1]):
    mx = abs(i[0] - arr[0][0]) + abs(i[1] - arr[0][1])
print(mx)
N = int(input())
x,y = map(int,input().split())
minx, miny = x,y
maxx, maxy = x,y
maxdist = 0
for i in range(N-1):
  x,y = map(int,input().split())
  dist1 = abs(minx - x) + abs(miny - y)
  dist2 = abs(maxx - x) + abs(maxy - y)
  if dist1 > maxdist:
    maxx = x
    maxy = y
    maxdist = dist1
  elif dist2 > maxdist:
    minx = x
    miny = y
    maxdist = dist2
    
print(maxdist)
N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
tail = 0
head = float('inf')
for i in range(N):
    tail = max(tail, sum(A[i]))
    head = min(head, sum(A[i]))
ans_1 = tail - head

tmp_h, tmp_t = 0, 0
tail = A[i]
head = A[i]
for i in range(N):
    tail = A[i] if tmp_h < A[i][0]-A[i][1] else tail
    head = A[i] if tmp_t < A[i][1]-A[i][0] else head

ans_2 = abs(tail[0]-head[0]) + abs(tail[1]-head[1])
ans = max(ans_1, ans_2)
print(ans)
N = int(input())
hw = [[int(i) for i in input().split()] for _ in range(N)]

minD = 2 * 10**9
min = 0
maxD = 0
max = 0

for i in range(N):
    if (minD > (hw[i][0] + hw[i][1])):
        minD = hw[i][0] + hw[i][1]
        min = i
    if (maxD < hw[i][0] + hw[i][1]):
        maxD = hw[i][0] + hw[i][1]
        max = i

print(abs(hw[max][0] - hw[min][0]) + abs(hw[max][1] - hw[min][1]))
n=int(input())
s=[]
d=[]
for i in range(n):
    x,y=map(int,input().split())
    s.append(abs(x+y))
    d.append(abs(x-y))
l=[]
for i in range(n):
  for j in range(i+1,n):
    l.append(max(abs((s[i]-s[j])),abs((d[i]-d[j]))))
print(max(l))
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *XY = map(int, read().split())

    P = [x + y for x, y in zip(*[iter(XY)] * 2)]
    mi = min(P)
    ma = max(P)

    print(abs(mi - ma))

    return


if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
def solve():
    N = int(input())
    z = sorted(sum(map(int,input().split())) for _ in range(N))
    return str(z[-1]-z[0])

if __name__ == '__main__':
    print(solve())
p=[]
for i in range(int(input())):
    m,n=map(int,input().split())
    p.append([m,n])
g=p
p.sort(key=lambda x:x[0])
d=-99999999
for i in range(1,len(p)):
    d=max(d,abs(p[i][1]-p[i-1][1])+abs(p[i][0]-p[i-1][0]))
p=g
p.sort(key=lambda x:x[1])
d1=-99999999
for i in range(1,len(p)):
    d1=max(d1,abs(p[i][1]-p[i-1][1])+abs(p[i][0]-p[i-1][0]))
print(max(d,d1))
N = int(input())
ls = []
for _ in range(N):
    x,y = map(int, input().split())
    s = x+y
    t = x-y
    d = max(s,t)
    ls.append(d)
print(max(ls) - min(ls))
def md(x1, y1, x2, y2):
  return abs(x1 - x2) + abs(y1 - y2)

N = int(input())
Coordinates = [tuple(map(int, input().split())) for _  in range(N)]

maxd = 0
for i in range(N):
  for j in range(N):
    if i == j:
      continue
    else:
      d = md(Coordinates[i][0], Coordinates[i][1], Coordinates[j][1], Coordinates[j][1])
      if d > maxd:
        maxd = d
print(maxd)
n = int(input())
p = [list(map(int, input().split())) for _ in range(n)]
for i, v in enumerate(p):
    x, y = v
    p[i] = x-y, x+y

xm, ym = 0, 0
xw, yw = 10**9, 10**9
for x, y in p:
    xm = max(xm, x)
    xw = min(xw, x)
    ym = max(ym, y)
    yw = min(yw, y)

ans = max(abs(xm - xw), abs(ym - yw))
print(ans)
N=int(input())
A=[]
min_x=10**9+1
min_y=10**9+1
B=[0 for i in range(N)]
for i in range(N):
    x,y=map(int,input().split())
    A.append([x,y])
    min_x=min(min_x,x)
    min_y=min(min_y,y)
for i in range(N):
    A[i][0]=A[i][0]-min_x
    A[i][1]=A[i][1]-min_y
    B[i]=A[i][0]+A[i][1]
print(max(B)-min(B))
N = int(input())
M0 = M1 = 0
m0 = m1 = float('inf')

for _ in range(N):
    x, y = map(int, input().split())
    M0 = max(M0, x - y)
    m0 = min(m0, x - y)
    M1 = max(M1, x + y)
    m1 = min(m1, x + y)

print(max(M0 - m0, M1 - m1))
n = int(input())
point_sum = []
for i in range(n):
  a,b = map(int, input().split())
  point_sum.append(a+b)
print(max(point_sum) - min(point_sum))
n=int(input())
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
p1=min(l)
p2=max(l)
p3=min([l[i][::-1] for i in range(n)])
p4=max([l[i][::-1] for i in range(n)])
def f(a,b):
    return abs(a[0]-b[0])+abs(a[1]-b[1])
ans=0
for i in l:
    ans=max(ans,f(i,p1))
    ans = max(ans,f(i, p2))
    ans = max(ans,f(i, p3))
    ans = max(ans,f(i, p4))
print(ans)
n = int(input())
maxx1 =maxx2 =0
minn1 = minn2 =  2000000001
for i in range(n):
    x,y = map(int,input().split())
    minn1 = min(minn1,x+y)
    maxx1 = max(maxx1,x+y)
    minn2 = min(minn2,abs(x-y))
    maxx2 = max(maxx2,abs(x-y))
print(max(maxx1-minn1,maxx2+minn2))
n = int(input())
max_x = max_y = 0
min_x = min_y = 5 * 10**9
for i in range(n):
    X, Y = map(int, input().split())
    x = X + Y
    y = X - Y
    max_x = max(max_x, x)
    max_y = max(max_y, y)
    min_x = min(min_x, x)
    min_y = min(min_y, y)
print(max(max_x - min_x, max_y - min_y))
n = int(input())
xy = []
for i in range(n):
    l = list(map(int, input().split()))
    xy.append(l[0]+l[1])
print(max(xy)-min(xy))
def calc_dist(x1, x2):
    return abs(x1[0]-x2[0]) + abs(x1[1]-x2[1])


def main():

    N = int(input())
    G = []
    for i in range(N):
        G.append(list(map(int, input().split())))
    G1 = sorted(G, key=lambda x:x[0])
    G2 = sorted(G, key=lambda x:x[1])
    print(max((calc_dist(G1[0], G2[0]), calc_dist(G1[1], G2[0]), calc_dist(G1[0], G2[1]), calc_dist(G1[1], G2[1]))))
    
    
if __name__ == '__main__':
    main()
N = int(input())
v = [list(map(int, input().split())) for i in range(N)]
minx = min([v[i][0] for i in range(N)])
miny = min([v[i][1] for i in range(N)])
v.sort(key = lambda x:x[0] - minx + x[1] - miny)
d = abs(v[0][0] - v[N-1][0]) + abs(v[0][1] - v[N-1][1])
print(d)
N = int(input())
z = []
for _ in range(N):
  x, y = list(map(int, input().split()))
  z.append([x, y])

z.sort()
mdct = 0
lx, ly = z[0]
rx, ry = z[N-1]
z.sort(key=lambda x: x[1])
sx, sy = z[0]
ux, uy = z[N-1]
for xa, ya in [[lx, ly], [rx, ry]]:
  for xb, yb in [[sx, sy], [ux, uy]]:
    mdct = max(mdct, abs(xa - xb) + abs(ya - yb))

print(mdct)
n = int(input())
x, y, xy = [], [], []
for i in range(n):
	temp_x, temp_y = map(int, input().split())
	x.append(temp_x)
	y.append(temp_y)
	xy.append(temp_x * temp_y)
max_index, min_index = xy.index(max(xy)), xy.index(min(xy))
print(abs(x[max_index] - x[min_index]) + abs(y[max_index] - y[min_index]))
n = int(input())
x,y = map(int,input().split())
maxplus = x+y
minplus = x+y
maxminus = x-y
minminus = x-y
for i in range(n-1):
  x,y = map(int,input().split())
  if x+y > maxplus:
    maxplus = x+y
  elif x+y < minplus:
    minplus = x+y
  elif x-y > maxminus:
    maxminus = x-y
  elif x-y < minminus:
    minminus = x-y
print(max(maxplus-minplus,maxminus-minminus))
n=int(input())
r=[]
for _ in range(n):
    a,b=map(int,input().split())
    r.append([a+b,[a,b]])
r=sorted(r,reverse=True,key=lambda x:x[0])
print(abs(r[0][1][0]-r[-1][1][0])+abs(r[0][1][1]-r[-1][1][1]))
N=int(input())

P=[tuple(map(int,input().split())) for _ in [0]*N]
goodP=P[0]
res=-1

while 1:
    r=-1
    for x,y in P:
        nr=abs(x-goodP[0])+abs(y-goodP[1])
        if nr>r:
            r=nr
            ngoodP=(x,y)
    goodP=ngoodP
    if r==res:
        break
    else:
        res=r
print(res)
N = int(input())
xy = [list(map(int,input().split())) for _ in range(N)]
ma = 0
mi = float('inf')
for x,y in xy:
  ma = max(ma,abs(x-y))
  mi = min(mi,abs(x-y))
ans = ma - mi

ma = 0
mi = float('inf')
for x,y in xy:
  ma = max(ma,x+y)
  mi = min(mi,x+y)
  
ans = max(ans, ma - mi)
print(ans)
n=int(input())
xy=[list(map(int,input().split())) for i in range(n)]
d=[]
for i in range(n):
  d.append([xy[i][0]+xy[i][1],xy[i][0],xy[i][1]])
d.sort()
print(abs(d[0][1]-d[-1][1])+abs(d[0][2]-d[-1][2]))
#import random
n=int(input())

pnt=[]
for i in range(n):
  pnt.append(list(map(int,input().split())))
  #pnt.append([random.randint(int(-1e9),int(1e9)),random.randint(int(-1e9),int(1e9))])
pnt.sort(key=lambda x:abs(x[0])+abs(x[1]),reverse=True)
mn=list(reversed(pnt))
mx=0

for i in range(min(n,6000)):
  for j in range(i+1,min(n,6000)):
    mx=max(abs(pnt[i][0]-pnt[j][0])+abs(pnt[i][1]-pnt[j][1]),mx)
    mx=max(abs(pnt[i][0]-mn[j][0])+abs(pnt[i][1]-mn[j][1]),mx)
print(mx)
n = int(input())

top= 0
bot= 10**10

for _ in range(n):
	
	x,y = map(int, input().split(' '))
	tot= x+y
	if tot> top:
		top= tot
	if tot< bot:
		bot= tot

print(top-bot)
from itertools import combinations
from operator import itemgetter

n = int(input())
XY = [tuple(int(x) for x in input().split()) for _ in range(n)]
X = sorted(XY, key=itemgetter(0))
Y = sorted(XY, key=itemgetter(1))
def dist(a, b):
    return abs(a[0] - b[0]) + abs(a[1] - b[1])
ans = 0
if n < 3000:
    for a, b in combinations(XY, 2):
        ans = max(ans, dist(a, b))
else:
    A = X[:750] + X[-750:] + Y[:750] + Y[-750:]
    for a, b in combinations(A, 2):
        ans = max(ans, dist(a, b))
print(ans)
n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
d=[x+y for x,y in xy]
d.sort()
ans=d[-1]-d[0]
maxy=max([y for x,y in xy])
dr=[x+(maxy-y) for x,y in xy]
ans=max(ans,dr[-1]-dr[0])
print(ans)
import sys
input = sys.stdin.readline
N = int(input())
mn = 10 ** 10
mx = 0
for _ in range(N):
  x, y = map(int, input().split())
  mn = min(mn, x + y)
  mx = max(mx, x + y)
print(abs(mx - mn))
n=int(input())

x=[]
y=[]

for i in range(n):
  s,t=map(int,input().split())
  x.append(s+t)
  y.append(abs(s-t))

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


p=max(k)
q=min(k)
print(p-q)
num_inputs = int(input())
max_pair = 0
for i in range(0, num_inputs):
  pair = input().split(" ")
  curr_x = int(pair[0])
  curr_y = int(pair[1])
  if i == 0:
    min_pair = curr_x + curr_y
  if (curr_x + curr_y) >= max_pair:
    max_pair = curr_x + curr_y
  elif (curr_x + curr_y) <= min_pair:
    min_pair = (curr_x + curr_y)
  print(min_pair, max_pair)
print(max_pair-min_pair)
n = int(input())
c = [[int(i) for i in input().split()] for i in range(n)]
x_0 = c[0][0]
y_0 = c[0][1]
x_1 = c[1][0]
y_1 = c[1][1]
l = abs(x_0 - x_1) + abs(y_0 - y_1)
for i in range(1,n):
    x = c[i][0]
    y = c[i][1]
    l0 = abs(x_0 - x) + abs(y_0 - y)
    if l < l0:
        l = l0
        x_0 = x
        y_0 = y
print(l)
# import sys
# input = sys.stdin.readline

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

n = int(input())
point = []
u = []
for i in range(n):
    a,b = mp()
    point.append((a,b))
    u.append(a+b)
print(max(u)-min(u))
n = int(input())
 
x = []
y = []
distance = []
 
for i in range(n):
  x1, y1 = input().split()
  x1 = int(x1)
  y1 = int(y1)
  x.append(x1)
  y.append(y1)
 
for i in range(len(x)-1):
  temp = abs(x[i] - x[1+i]) + abs(y[i] - y[1+i])
  distance.append(temp)

max = distance[0]
 
for i in range(1,len(distance)-1):
  if distance[i] >= max:
    max = distance[i]
 
print(max)
n=int(input())
xy_1 = [0]*n
xy_2 = [0]*n
for i in range(n):
  x,y = map(int,input().split())
  xy_1[i] = x + y
  xy_2[i] = x - y

print(max(max(xy_1) - min(xy_1), max(xy_2)))
n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
a = []
b = []
for i in range(n):
    a.append(abs(xy[i][0]+xy[i][1]))
    b.append(abs(xy[i][0]-xy[i][1]))
a_sort = sorted(a)
b_sort = sorted(b)

print(max(a_sort[-1]-a_sort[0],b_sort[-1]-b_sort[0]))
import numpy as np

n = int(input())
xy = np.array([list(map(int,input().split())) for _ in range(n)],int)

x = xy[:,0]
y = xy[:,0]

a = x+y
b = -x+y

ans = max(a.max() - a.min(), b.max()-b.min())
print(ans)
def f(x, y):
    return x-y, x+y


n = int(input())
p = [list(map(int, input().split())) for i in range(n)]

max_x = 0
min_x = 2000000000
max_y = 0
min_y = 2000000000
for xi, yi in p:
    x_, y_ = f(xi, yi)
    max_x = max(max_x, x_)
    min_x = min(min_x, x_)
    max_y = max(max_y, y_)
    min_y = min(min_y, y_)

print(max(max_x - min_x, max_y - min_y))
N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
tail = 0
head = float('inf')
for i in range(N):
    tail = max(tail, sum(A[i]))
    head = min(head, sum(A[i]))

ans = tail - head
print(ans)
n = int(input())
str_list = [list(input().split()) for _ in range(n)]
count = 0
u = 0
for n in str_list:
    if count == 0:
        m = n
        count +=1
        continue
    if abs(int(n[0])-int(m[0])) + abs(int(n[1])-int(m[1])) > u:
        u = abs(int(n[0])-int(m[0])) + abs(int(n[1])-int(m[1]))
    m = n
    count +=1
print(u)
n = int(input())
l=[]
for i in range(n):
  l.append(list(map(int,list(input().split()))))
l.sort()
m = sorted(l,key = lambda y:y[1])
x,y=0,0
for i in range(1,n):
  p = abs(l[i][0]-l[0][0])+abs(l[i][1]-l[0][0])
  if p>x:
    x=p
  q = abs(m[i][0]-m[0][0])+abs(m[i][1]-m[0][0])
  if q>y:
    y=q  
    
print(max(x,y))
N = int(input())
p = []
for _ in range(N):
    x, y = map(int, input().split())
    p.append((x, y))
p.sort()
x1, y1 = p[0]
x2, y2 = p[1]
if x1 <= x2 and y1 <= y2:
    print(abs((x1 + y1) - (x2 + y2)))
elif x1 <= x2 and y1 >= y2:
    print(abs((x1 - y1) - (x2 + y2)))
elif x1 >= x2 and y1 >= y2:
    print(abs((x1 + y1) - (x2 + y2)))
elif x1 >= x2 and y1 <= y2:
    print(abs((x1 - y1) - (x2 + y2)))
N = int(input())
mant = [0 for _ in range(N)]
for i in range(N):
    x, y = map(int, input().split())
    mant[i] = x + y

print(max(mant)-min(mant))
n=int(input())

ans=[]

for _ in range(n):
  a,b=map(int,input().split())
  c=a+b
  ans.append(c)
  
m=min(ans)
M=max(ans)

print(M-m)
N = int(input())

dists = []
while N:
    x, y = map(int, input().split())
    dists.append((x, y, x+y))
    N -= 1

dists.sort(key=lambda x: x[2])
print(abs(dists[0][0] - dists[-1][0]) + abs(dists[0][1] - dists[-1][1]))
n = int(input())
array1 = []
array2 = []
for i in range(n):
  x,y = map(int,input().split())
  array1.append(abs(x+y))
  array2.append(abs(x-y))
  
print(max(max(array1)-min(array1), max(array2)-min(array2)))
n=int(input())
l=[]

for i in range(n):
  x,y=(map(int,input().split()))
  we=int(((x**2)+(y**2))**0.5)
  ll=[we,x,y]
  l.append(ll)

l.sort()
#print(l)
print((l[-1][2]-l[0][2])+(l[-1][1]-l[0][1]))

'''
  ll1=[ll[1],ll[0]]
  lan.append(ll1)

l.sort()
lan.sort()
we=abs(l[0][0]-l[-1][0])+abs(l[0][1]-l[-1][1])
we1=abs(lan[0][0]-lan[-1][0])+abs(lan[0][1]-lan[-1][1])
print(max(we,we1))
'''
n=int(input())
m=0
t1,t2=map(int,input().split())
for i in range(n-1):
    x,y=map(int,input().split())
    xn=(x-t1)
    yn=(y-t2)
    
    if xn<0:
        xn=xn*(-1)
    
    if yn<0:
        yn=yn*(-1)
    
    l=xn+yn
    
    t1=x
    t2=y
    
    if l>m:
        m=l
    
print(m)
n=int(input())

minx=10**6
maxx=-10**6
miny=10**6
maxy=-10**6

for _ in range(n):
    x,y=map(int,input().split())

    maxx=max(maxx,x+y)
    minx=min(minx,x+y)
    maxy=max(maxy,x-y)
    miny=min(miny,x-y)

print(max(maxx-minx,maxy-miny))
N = int(input())
xs = []
ys = []
for _ in range(N):
    x,y = map(int,input().split())
    xs.append(x)
    ys.append(y)
fxys = []
for i in range(N):
    x = xs[i]
    y = ys[i]
    fxys.append((x-y, x+y))
m = 0
for d in [0, 1]:
    mx = 0
    mi = float("inf")
    for i in range(N):
        mx = max(fxys[i][d], mx)
    for i in range(N):
        mi = min(fxys[i][d], mi)
    m = max(mx-mi, m)
print(m)
n = int(input())
max_x = max_y = 0
min_x = min_y = 10**9
for i in range(n):
    X, Y = map(int, input().split())
    x = X + Y
    y = X - Y
    max_x = max(max_x, x)
    max_y = max(max_y, y)
    min_x = min(min_x, x)
    min_y = min(min_y, y)
print(max(max_x - min_x, max_y - min_y))
if __name__ == "__main__":
    n = int(input())
    a=[]
    for i in range(n):
        x,y = map(int,input().split())
        a.append(x+y)
    print(max(a)-min(a))
N = int(input())
table = [[int(i) for i in input().split()] for N in range(N)]

a = -1
b = 10**9 * 2 + 1
c = -1
d = 10**9 * 2 + 1
for i in range(N):
    p = table[i][0]
    q = table[i][1]
    if a < p+q:
        a = p+q
    if b > p+q:
        b = p+q
    if c < p-q:
        c = p-q
    if d > p-q:
        d = p-q

print(max(a-b,c-d))
N = int(input())
t = []
for i in range(N):
    a = tuple(map(int, input().split()))
    t.append(a[0] + a[1])
t.sort()
print(t[-1] - t[0])
n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]
yx = [[y, x] for x, y in xy]
xy.sort()
yx.sort()
yx = [[x, y] for y, x in yx]

ans = 0
tmp = [xy[0], xy[-1], yx[0], yx[-1]]
print(yx)
for x, y in tmp:
    for x1, y1 in tmp:
        ans = max(ans, abs(x - x1) + abs(y - y1))
print(ans)
Row = int(input())
List = []
for i in range (Row):
  List.append(list(map(int, input().split())))
Slist = [0]*Row
for i in range(Row):
  Slist[i] = abs(List[i][0]) + abs(List[i][1])
Slist.sort()
res = Slist[Row-1] - Slist[0]
print(res)
n = int(input())
x = [0]*n
y = [0]*n
for i in range(n):
    x[i], y[i] = map(int, input().split())

res = 0
for i in range(n):
    for j in range(i, n-1):
        res = max(res, abs(x[i] - x[j]) + abs(y[i] - y[j]))

print(res)
n=int(input())
a=[]
for i in range(n):
    x,y=list(map(int,input().split()))
    a.append(x+y)

print(abs(max(a))-abs(min(a)))
n=int(input())
s,p=10**9+1,10**9+1
t,q=-1,-1

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))
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

n = int(readline())

p = [list(map(int,readline().split())) for i in range(n)]

xmin = INF
ymin = INF

for (x,y) in p:
    xmin = min(x,xmin)
    ymin = min(y,ymin)

for i in range(n):
    p[i][0] -= xmin
    p[i][1] -= ymin

dmax = 0
dmin = INF

for (x,y) in p:
    dmax = max(dmax, x+y)
    dmin = min(dmin, x+y)

print(dmax-dmin)
from sys import stdin

readline = stdin.readline

N = int(readline())
xy = [tuple(map(int, readline().split())) for _ in range(N)]

xy = list(set(xy))

xy.sort()

c = set(xy[:1500])
c = c | set(xy[-1500:])

xy.sort(key=lambda x: x[1])

c = c | set(xy[:1500])
c = c | set(xy[-1500:])

c = list(c)
result = 0
for i in range(len(c)):
    for j in range(i + 1, len(c)):
        result = max(result, abs(c[i][0] - c[j][0]) + abs(c[i][1] - c[j][1]))
print(result)
import sys
import itertools
N = int(input())
Z = [list(map(int,input().split())) for _ in range(N)]
ans = 0
ZX = sorted(Z,key=lambda x: x[0])
ZY = sorted(Z,key=lambda x: x[1])
ZZ = [ZX[0],ZX[-1],ZY[0],ZY[-1]]
for x in itertools.combinations(ZZ,2):
  ans = max(ans, abs(x[0][0]-x[1][0])+abs(x[0][1]-x[1][1]))

print(ans)
N = int(input())

dots = []
for _ in range(N):
    dots.append(list(map(int,input().split())))

max = 0
for i in range(N):
    for j in range(i+1,N):
        dist = abs(dots[i][0]-dots[j][0])+abs(dots[i][0]-dots[j][0])
        if dist > max:
            max = dist

print(max)
N = int(input())
l = [tuple(map(int, input().split())) for i in range(N)]
d=set()
for i, j in zip(range(N),range(1,N)):
    d.add(abs(l[i][0]-l[j][0]) + abs(l[i][1]-l[j][1]))
print(max(d))
l = []
for _ in range(int(input())):
    x, y = map(int, input().split())
    l.append(x+y)
l.sort()
print(l[-1]-l[0])
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    xy = [list(map(int, rl().split())) for _ in range(N)]
    xy.sort(key=lambda n: sum(n))
    ans = sum(xy[-1]) - sum(xy[0])
    print(ans)


if __name__ == '__main__':
    solve()
import sys
input = sys.stdin.readline
n = int(input())
C = [list(map(int,input().split())) for i in range(n)]

a = 10**9+5
b = 0
c = 10**9+5
d = 0

for i in range(n):
    a = min(a, C[i][0]+C[i][1])
    b = max(b, C[i][0]+C[i][1])
    c = min(c, C[i][0]-C[i][1])
    d = max(d, C[i][0]-C[i][1])

print(max(b-a,d-c))
N = int(input())
L = [list(map(int, input().split())) for _ in range(N)]
L.sort(key = lambda x: x[0]**2 + x[1]**2, reverse = True)

base_x = L[0][0] 
base_y = L[0][1]
ans = 0
for l in L:
    ans = max(ans, abs(l[0] - base_x) + abs(l[1] - base_y))

print(ans)
n = int(input())
l = [list(map(int,input().split())) for i in range(n)]
x = list(sorted(l,key=lambda x: x[0]))
y = list(sorted(l,key=lambda x: x[1]))
ax = abs(x[0][0]-x[-1][0])+abs(x[0][1]-x[-1][1])
ay = abs(y[0][0]-y[-1][0])+abs(y[0][1]-y[-1][1])
print(max(ax,ay))
n = int(input())

mx_dis1, mn_dis1 = 0, 10**9
mx_dis2, mn_dis2 = 0, 10**9
for i in range(n):
    x, y = map(int, input().split())
    dis1 = x + y
    dis2 = x - y
    mx_dis1 = max(dis1, mx_dis1)
    mn_dis1 = min(dis1, mn_dis1)
    mx_dis2 = max(dis2, mx_dis2)
    mn_dis2 = min(dis2, mn_dis2)

ans1 = mx_dis1 - mn_dis1
ans2 = mx_dis2 - mn_dis2

print(max(ans1, ans2))
import random
N = int(input())
lismoto = "0"*N*2
lis = list(lismoto)
for i in range(0,len(lis),2):
    lis[i],lis[i+1] = map(int,input().split())

li = [lis[idx:idx + 2] for idx in range(0,len(lis), 2)]

ma = 0
for i in range(10**5):
    a = random.randint(0,N-1)
    b = random.randint(0,N-1)
    
    karima = abs(li[a][0]-li[b][0]) + abs(li[a][1] - li[b][1])
    if karima > ma:
        ma = karima

print(ma)
from sys import stdin

N = int(stdin.readline().strip())
min_a = float("inf")
min_s = (0,0)
max_a = 0
max_s = (0,0)
for _ in range(N):
    x,y = map(int,stdin.readline().strip().split())
    manhat = x+y
    if manhat < min_a:
        min_s = (x,y)
        min_a = manhat
    elif manhat > max_a:
        max_a = manhat
        max_s = (x,y)
print(abs(max_s[0]-min_s[0])+abs(max_s[1]-min_s[1]))
n = int(input())
lst, result = [], []

for _ in range(n):
    x, y = map(int, input().split())
    lst.append([x, y, x**2 + y**2])

lst = sorted(lst, key=lambda x:x[2])

print(abs(lst[n - 1][0] - lst[0][0]) + abs(lst[n-1][1] - lst[0][1]))