N=int(eval(input()))

answer=0



xylist=[]

for _ in range(N):

  x,y=list(map(int,input().split()))

  xylist.append((x,y))



ppxylist=[]

for i in range(N):

  x,y=xylist[i]

  ppxylist.append((x+y,x,y))

ppxylist.sort()

#print(ppxylist)

answer=max(answer,ppxylist[-1][0]-ppxylist[0][0])



pmxylist=[]

for i in range(N):

  x,y=xylist[i]

  pmxylist.append((x-y,x,y))

pmxylist.sort()

#print(ppxylist)

answer=max(answer,pmxylist[-1][0]-pmxylist[0][0])



mpxylist=[]

for i in range(N):

  x,y=xylist[i]

  mpxylist.append((-x+y,x,y))

mpxylist.sort()

#print(ppxylist)

answer=max(answer,mpxylist[-1][0]-mpxylist[0][0])



mmxylist=[]

for i in range(N):

  x,y=xylist[i]

  mmxylist.append((-x-y,x,y))

mmxylist.sort()

#print(ppxylist)

answer=max(answer,mmxylist[-1][0]-mmxylist[0][0])

  

print(answer)
N=int(eval(input()))

answer=0



xylist=[]

pxylist=[]

mxylist=[]

for _ in range(N):

  x,y=list(map(int,input().split()))

  xylist.append((x,y))

  pxylist.append(x+y)

  mxylist.append(x-y)

pxylist.sort()

mxylist.sort()



answer=max(pxylist[-1]-pxylist[0],mxylist[-1]-mxylist[0])

print(answer)
N = int(eval(input()))
answer = 0
xylist = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    xylist.append((x, y))
ppxylist = []
for i in range(N):
    x, y = xylist[i]
    ppxylist.append((x + y, x, y))
ppxylist.sort()
# print(ppxylist)
answer = max(answer, ppxylist[-1][0] - ppxylist[0][0])
pmxylist = []
for i in range(N):
    x, y = xylist[i]
    pmxylist.append((x - y, x, y))
pmxylist.sort()
# print(ppxylist)
answer = max(answer, pmxylist[-1][0] - pmxylist[0][0])
mpxylist = []
for i in range(N):
    x, y = xylist[i]
    mpxylist.append((-x + y, x, y))
mpxylist.sort()
# print(ppxylist)
answer = max(answer, mpxylist[-1][0] - mpxylist[0][0])
mmxylist = []
for i in range(N):
    x, y = xylist[i]
    mmxylist.append((-x - y, x, y))
mmxylist.sort()
# print(ppxylist)
answer = max(answer, mmxylist[-1][0] - mmxylist[0][0])
print(answer)

N = int(eval(input()))
answer = 0
xylist = []
pxylist = []
mxylist = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    xylist.append((x, y))
    pxylist.append(x + y)
    mxylist.append(x - y)
pxylist.sort()
mxylist.sort()
answer = max(pxylist[-1] - pxylist[0], mxylist[-1] - mxylist[0])
print(answer)

+pxylist = [] +mxylist = [] -ppxylist = [] -for i in range(N): -    x, y = xylist[i] -    ppxylist.append((x + y, x, y)) -ppxylist.sort() -# print(ppxylist) -answer = max(answer, ppxylist[-1][0] - ppxylist[0][0]) -pmxylist = [] -for i in range(N): -    x, y = xylist[i] -    pmxylist.append((x - y, x, y)) -pmxylist.sort() -# print(ppxylist) -answer = max(answer, pmxylist[-1][0] - pmxylist[0][0]) -mpxylist = [] -for i in range(N): -    x, y = xylist[i] -    mpxylist.append((-x + y, x, y)) -mpxylist.sort() -# print(ppxylist) -answer = max(answer, mpxylist[-1][0] - mpxylist[0][0]) -mmxylist = [] -for i in range(N): -    x, y = xylist[i] -    mmxylist.append((-x - y, x, y)) -mmxylist.sort() -# print(ppxylist) -answer = max(answer, mmxylist[-1][0] - mmxylist[0][0]) +    pxylist.append(x + y) +    mxylist.append(x - y) +pxylist.sort() +mxylist.sort() +answer = max(pxylist[-1] - pxylist[0], mxylist[-1] - mxylist[0])