while True:
    m = int(raw_input())
    if m==0:break
    seiza = [] # pos. of const.
    for i in range(m):
        seiza.append(map(int,raw_input().split()))
    seiza.sort()
    n = int(raw_input())
    hoshi = []
    for j in range(n):
        hoshi.append(map(int,raw_input().split()))
    hoshi.sort()
    
    try:
        for xs,ys in seiza:
            for xh,yh in hoshi:
                dx = xh-xs
                dy = yh-ys
                tmp = [[x+dx,y+dy] for x,y in seiza]
                cnt = 0
                for item in tmp:
                    if item in hoshi:
                        cnt += 1
                        if cnt == len(tmp):
                            raise ZeroDivisionError
                    else:
                        break
    except ZeroDivisionError:
        print dx,dy        