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