while 1:
    m=int(raw_input())
    if m==0:break
    st=[map(int,raw_input().split()) for _ in xrange(m)]
    n=int(raw_input())
    pi=[map(int,raw_input().split()) for _ in xrange(n)]
    d=[[st[i][0]-st[0][0],st[i][1]-st[0][1]] for i in xrange(1,m)]
    for i in xrange(n):
        mo=[[pi[j][0]-pi[i][0],pi[j][1]-pi[i][1]] for j in xrange(n)]
        cnt=0
        for k in xrange(m-1):
            if not d[k] in mo:continue
            else:cnt+=1
        if cnt==m-1:
            print pi[i][0]-st[0][0],pi[i][1]-st[0][1]
            break