while 1:
    n = input()
    if n == 0: break
    p = sorted([map(int, raw_input().split()) for i in range(n)])
    d = [[p[i][0] - p[0][0], p[i][1] - p[0][1]] for i in range(1,n)]
    m = input()
    q = sorted([map(int, raw_input().split()) for i in xrange(m)])
    for p1 in q:
        for i in range(n-1):
            f = True
            for p2 in q:
                if p1[0] + d[i][0] == p2[0] and p1[1] + d[i][1] == p2[1]:
                    f = False
                    break
            if f: break
        else:
            print p1[0] - p[0][0], p1[1] - p[0][1]