n=int(eval(input()))

bignum=10**30

num1,num2,num3,num4=-bignum,bignum,-bignum,bignum

for i in range(n):

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

  num1=max(x+y,num1)

  num2=min(x+y,num2)

  num3=max(x-y,num3)

  num4=min(x-y,num4)

print((max(num1-num2,num3-num4)))
n=int(eval(input()))

alist=[]

blist=[]

for i in range(n):

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

  alist.append(x+y)

  blist.append(x-y)

print((max(max(alist)-min(alist),max(blist)-min(blist))))
n = int(eval(input()))
bignum = 10**30
num1, num2, num3, num4 = -bignum, bignum, -bignum, bignum
for i in range(n):
    x, y = list(map(int, input().split()))
    num1 = max(x + y, num1)
    num2 = min(x + y, num2)
    num3 = max(x - y, num3)
    num4 = min(x - y, num4)
print((max(num1 - num2, num3 - num4)))

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

-bignum = 10**30 -num1, num2, num3, num4 = -bignum, bignum, -bignum, bignum +alist = [] +blist = [] -    num1 = max(x + y, num1) -    num2 = min(x + y, num2) -    num3 = max(x - y, num3) -    num4 = min(x - y, num4) -print((max(num1 - num2, num3 - num4))) +    alist.append(x + y) +    blist.append(x - y) +print((max(max(alist) - min(alist), max(blist) - min(blist))))