import sys

input = sys.stdin.readline



# coding: utf-8





def det(p, q):

    return p[0]*q[1] - p[1]*q[0]





def sub(p, q):

    return (p[0]-q[0], p[1]-q[1])





def get_convex_hull(points):

    # どの3点も直線上に並んでいないと仮定する。

    n = len(points)

    points.sort()

    size_convex_hull = 0

    ch = []

    for i in range(n):

        while size_convex_hull > 1:

            v_cur = sub(ch[-1], ch[-2])

            v_new = sub(points[i], ch[-2])

            if det(v_cur, v_new) > 0:

                break

            size_convex_hull -= 1

            ch.pop()

        ch.append(points[i])

        size_convex_hull += 1



    t = size_convex_hull

    for i in range(n-2, -1, -1):

        while size_convex_hull > t:

            v_cur = sub(ch[-1], ch[-2])

            v_new = sub(points[i], ch[-2])

            if det(v_cur, v_new) > 0:

                break

            size_convex_hull -= 1

            ch.pop()

        ch.append(points[i])

        size_convex_hull += 1



    return ch[:-1]



N = int(eval(input()))

p = []

ans = 0

for _ in range(N):

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

    p.append((x,y))

if N == 2:

    x0,y0 = p[0]

    x1,y1 = p[1]

    print((abs(x0-x1)+abs(y0-y1)))

    exit()



p = get_convex_hull(p)

n = len(p)

for i in range(n):

    xi,yi = p[i]

    for j in range(i+1,n):

        xj,yj = p[j]

        tmp = abs(xi-xj)+abs(yi-yj)

        ans = max(tmp,ans)

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

z = []

w = []

for i in range(N):

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

    z.append(x+y)

    w.append(x-y)



z_max = max(z)

z_min = min(z)

w_max = max(w)

w_min = min(w)



print((max(z_max-z_min,w_max-w_min)))
import sys

input = sys.stdin.readline
# coding: utf-8
def det(p, q):
    return p[0] * q[1] - p[1] * q[0]


def sub(p, q):
    return (p[0] - q[0], p[1] - q[1])


def get_convex_hull(points):
    # どの3点も直線上に並んでいないと仮定する。
    n = len(points)
    points.sort()
    size_convex_hull = 0
    ch = []
    for i in range(n):
        while size_convex_hull > 1:
            v_cur = sub(ch[-1], ch[-2])
            v_new = sub(points[i], ch[-2])
            if det(v_cur, v_new) > 0:
                break
            size_convex_hull -= 1
            ch.pop()
        ch.append(points[i])
        size_convex_hull += 1
    t = size_convex_hull
    for i in range(n - 2, -1, -1):
        while size_convex_hull > t:
            v_cur = sub(ch[-1], ch[-2])
            v_new = sub(points[i], ch[-2])
            if det(v_cur, v_new) > 0:
                break
            size_convex_hull -= 1
            ch.pop()
        ch.append(points[i])
        size_convex_hull += 1
    return ch[:-1]


N = int(eval(input()))
p = []
ans = 0
for _ in range(N):
    x, y = list(map(int, input().split()))
    p.append((x, y))
if N == 2:
    x0, y0 = p[0]
    x1, y1 = p[1]
    print((abs(x0 - x1) + abs(y0 - y1)))
    exit()
p = get_convex_hull(p)
n = len(p)
for i in range(n):
    xi, yi = p[i]
    for j in range(i + 1, n):
        xj, yj = p[j]
        tmp = abs(xi - xj) + abs(yi - yj)
        ans = max(tmp, ans)
print(ans)

N = int(eval(input()))
z = []
w = []
for i in range(N):
    x, y = list(map(int, input().split()))
    z.append(x + y)
    w.append(x - y)
z_max = max(z)
z_min = min(z)
w_max = max(w)
w_min = min(w)
print((max(z_max - z_min, w_max - w_min)))

-import sys - -input = sys.stdin.readline -# coding: utf-8 -def det(p, q): -    return p[0] * q[1] - p[1] * q[0] - - -def sub(p, q): -    return (p[0] - q[0], p[1] - q[1]) - - -def get_convex_hull(points): -    # どの3点も直線上に並んでいないと仮定する。 -    n = len(points) -    points.sort() -    size_convex_hull = 0 -    ch = [] -    for i in range(n): -        while size_convex_hull > 1: -            v_cur = sub(ch[-1], ch[-2]) -            v_new = sub(points[i], ch[-2]) -            if det(v_cur, v_new) > 0: -                break -            size_convex_hull -= 1 -            ch.pop() -        ch.append(points[i]) -        size_convex_hull += 1 -    t = size_convex_hull -    for i in range(n - 2, -1, -1): -        while size_convex_hull > t: -            v_cur = sub(ch[-1], ch[-2]) -            v_new = sub(points[i], ch[-2]) -            if det(v_cur, v_new) > 0: -                break -            size_convex_hull -= 1 -            ch.pop() -        ch.append(points[i]) -        size_convex_hull += 1 -    return ch[:-1] - - -p = [] -ans = 0 -for _ in range(N): +z = [] +w = [] +for i in range(N): -    p.append((x, y)) -if N == 2: -    x0, y0 = p[0] -    x1, y1 = p[1] -    print((abs(x0 - x1) + abs(y0 - y1))) -    exit() -p = get_convex_hull(p) -n = len(p) -for i in range(n): -    xi, yi = p[i] -    for j in range(i + 1, n): -        xj, yj = p[j] -        tmp = abs(xi - xj) + abs(yi - yj) -        ans = max(tmp, ans) -print(ans) +    z.append(x + y) +    w.append(x - y) +z_max = max(z) +z_min = min(z) +w_max = max(w) +w_min = min(w) +print((max(z_max - z_min, w_max - w_min)))