N = int(eval(input()))

G = []

for i in range(N):

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

    G.append([x,y])



a = -10**10

b = 10**10

c = -10**10

d = 10**10



for i in range(N):

    x = G[i][0]

    y = G[i][1]

    t = x+y

    u = x-y

    a = max(a,t)

    b = min(b,t)

    c = max(c,u)

    d = min(d,u)



#print(a,b,c,d)

ans = max(a-b,c-d)

print(ans)

N = int(eval(input()))

A = []

B = []

for i in range(N):

    x,y = list(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)
N = int(eval(input()))
G = []
for i in range(N):
    x, y = list(map(int, input().split()))
    G.append([x, y])
a = -(10**10)
b = 10**10
c = -(10**10)
d = 10**10
for i in range(N):
    x = G[i][0]
    y = G[i][1]
    t = x + y
    u = x - y
    a = max(a, t)
    b = min(b, t)
    c = max(c, u)
    d = min(d, u)
# print(a,b,c,d)
ans = max(a - b, c - d)
print(ans)

N = int(eval(input()))
A = []
B = []
for i in range(N):
    x, y = list(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)

-G = [] +A = [] +B = [] -    G.append([x, y]) -a = -(10**10) -b = 10**10 -c = -(10**10) -d = 10**10 -for i in range(N): -    x = G[i][0] -    y = G[i][1] -    t = x + y -    u = x - y -    a = max(a, t) -    b = min(b, t) -    c = max(c, u) -    d = min(d, u) -# print(a,b,c,d) +    A.append(x + y) +    B.append(x - y) +a = max(A) +b = min(A) +c = max(B) +d = min(B)