N,M = list(map(int,input().split()))
bottles = []
couriers = []
for _ in range(N):
    x,y = list(map(int,input().split()))
    bottles.append((x,y))
for _ in range(M):
    x,y = list(map(int,input().split()))
    couriers.append((x,y))
x,y = list(map(int,input().split()))
R = (x,y)

def man(a,b):
    return abs(a[0] - b[0]) + abs(a[1] - b[1])

RB = [man(R,bottles[i]) for i in range(N)]

BC = []
for i in range(N):
    ord_courier = [i for i in range(M)]
    ord_courier.sort(key = lambda j : man(bottles[i],couriers[j]))
    BC.append(ord_courier)

B_next_courier = [0] * N
total_d = 2 * sum(RB)

avail_bottles = [True] * N
avail_courier = [True] * M

best_d = float("inf")
best_i = 0
for i in range(N):
    d = man(couriers[BC[i][0]],bottles[i]) - RB[i]
    if d < best_d:
        best_d = d
        best_i = i
total_d += man(couriers[BC[i][0]],bottles[i]) - RB[i]
avail_bottles[best_i] = False
avail_courier[BC[best_i][0]] = False

stop = False
while not(stop):
    stop = True
    best_i = 0
    best_i_c = 0
    best_d = float("inf")
    for i in range(N):
        if avail_bottles[i]:
            ci = 0 
            while ci < M and not(avail_courier[BC[i][ci]]):
                ci += 1
            if ci < M:
                c = BC[i][ci]
                d = man(bottles[i],couriers[c]) - RB[i]
                if d < 0 and d < best_d:
                    stop = False
                    best_d = d
                    best_i = i
                    best_i_c = c
    if not(stop):
        avail_bottles[best_i] = False
        avail_courier[best_i_c] = False
        total_d -= best_d

print(total_d)
