while(1):
    M=int(raw_input())
    if M==0:
        break
    else:
        starxy=[]
        constxy=[]
        constdirect=[]
        for i in range(M):
            constxy.append([int(x) for x in raw_input().split()])
        N=int(raw_input())
        for j in range(N):
            starxy.append([int(x) for x in raw_input().split()])
        for i in range(1,M):
            constdirect.append([constxy[i][0]-constxy[0][0],constxy[i][1]-constxy[0][1]])
        const0=constxy[0]
        for star in starxy:
            fin=1
            for nextvector in constdirect:
                if not [star[0]+nextvector[0],star[1]+nextvector[1]] in starxy:
                    fin=0
                    break
            if fin:
                print star[0]-const0[0],star[1]-const0[1]
                break