N=int(eval(input()))



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



L1=[]

L2=[]

L3=[]

L4=[]

for x,y in P:

    L1.append(x+y)

    L2.append(-x+y)

    L3.append(x-y)

    L4.append(-x-y)



L1=sorted(L1)

L2=sorted(L2)

L3=sorted(L3)

L4=sorted(L4)



ans=max(L1[-1]-L1[0],L2[-1]-L2[0],L3[-1]-L3[0],L4[-1]-L4[0])

print(ans)

N=int(eval(input()))





Sum=[]

Sub=[]

for _ in range(N):

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

    Sum.append(x+y)

    Sub.append(x-y)



Sum = sorted(Sum)

Sub=sorted(Sub)

ans=max(abs(Sum[-1]-Sum[0]),abs(Sub[-1]-Sub[0]))

print(ans)

N = int(eval(input()))
P = [list(map(int, input().split())) for _ in range(N)]
L1 = []
L2 = []
L3 = []
L4 = []
for x, y in P:
    L1.append(x + y)
    L2.append(-x + y)
    L3.append(x - y)
    L4.append(-x - y)
L1 = sorted(L1)
L2 = sorted(L2)
L3 = sorted(L3)
L4 = sorted(L4)
ans = max(L1[-1] - L1[0], L2[-1] - L2[0], L3[-1] - L3[0], L4[-1] - L4[0])
print(ans)

N = int(eval(input()))
Sum = []
Sub = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    Sum.append(x + y)
    Sub.append(x - y)
Sum = sorted(Sum)
Sub = sorted(Sub)
ans = max(abs(Sum[-1] - Sum[0]), abs(Sub[-1] - Sub[0]))
print(ans)

-P = [list(map(int, input().split())) for _ in range(N)] -L1 = [] -L2 = [] -L3 = [] -L4 = [] -for x, y in P: -    L1.append(x + y) -    L2.append(-x + y) -    L3.append(x - y) -    L4.append(-x - y) -L1 = sorted(L1) -L2 = sorted(L2) -L3 = sorted(L3) -L4 = sorted(L4) -ans = max(L1[-1] - L1[0], L2[-1] - L2[0], L3[-1] - L3[0], L4[-1] - L4[0]) +Sum = [] +Sub = [] +for _ in range(N): +    x, y = list(map(int, input().split())) +    Sum.append(x + y) +    Sub.append(x - y) +Sum = sorted(Sum) +Sub = sorted(Sub) +ans = max(abs(Sum[-1] - Sum[0]), abs(Sub[-1] - Sub[0]))