N = int(eval(input()))

xs, ys = [], []

for _ in range(N):

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

    xs.append(x)

    ys.append(y)

A = [x + y for x, y in zip(xs, ys)]

B = [x - y for x, y in zip(xs, ys)]

ans = max([max(A) - min(A), max(B) - min(B)])

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

xs, ys = [], []

for _ in range(N):

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

    xs.append(x)

    ys.append(y)

U = [x + y for x, y in zip(xs, ys)]

V = [x - y for x, y in zip(xs, ys)]

ans = max([max(U) - min(U), max(V) - min(V)])

print(ans)
N = int(eval(input()))
xs, ys = [], []
for _ in range(N):
    x, y = list(map(int, input().split()))
    xs.append(x)
    ys.append(y)
A = [x + y for x, y in zip(xs, ys)]
B = [x - y for x, y in zip(xs, ys)]
ans = max([max(A) - min(A), max(B) - min(B)])
print(ans)

N = int(eval(input()))
xs, ys = [], []
for _ in range(N):
    x, y = list(map(int, input().split()))
    xs.append(x)
    ys.append(y)
U = [x + y for x, y in zip(xs, ys)]
V = [x - y for x, y in zip(xs, ys)]
ans = max([max(U) - min(U), max(V) - min(V)])
print(ans)

-A = [x + y for x, y in zip(xs, ys)] -B = [x - y for x, y in zip(xs, ys)] -ans = max([max(A) - min(A), max(B) - min(B)]) +U = [x + y for x, y in zip(xs, ys)] +V = [x - y for x, y in zip(xs, ys)] +ans = max([max(U) - min(U), max(V) - min(V)])