while True:
    try:
        m = int(raw_input())
        a = sorted([list(map(int, raw_input().split())) for i in range(m)])
        dax = [a[i][0]-a[0][0] for i in range(m)]
        n = int(raw_input())
        b = sorted([list(map(int, raw_input().split())) for i in range(n)])
        bx = [b[i][0] for i in range(n)]
        for i in range(n-m+1):
            for j in range(m):
                if bx[i]+dax[j] not in bx:
                    break
            else:
                print b[i][0]-a[0][0],b[i][1]-a[0][1]
                break
    except:
        break