def Judge(dx, dy):
    for x, y in star:
        mx = x + dx
        my = y + dy
        if (mx, my) not in pic:
            return False
    return True

def search():
    for sx, sy in star:
        for px, py in pic:
            dx = px-sx
            dy = py-sy
            if Judge(dx, dy):
                print dx, dy
                return
while True:
    m = input()
    if m==0: break
    star = set([tuple(map(int, raw_input().split())) for i in range(m)])
    n = input()
    pic = set([tuple(map(int, raw_input().split())) for i in range(n)])
    search()