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