for e in iter(input,'0'):
 a=sorted([list(map(int,input().split()))for _ in[0]*int(e)],key=lambda x:x[0])
 b=sorted([tuple(map(int,input().split()))for _ in[0]*int(input())],key=lambda x:x[0])
 for s,t in b:
  if not set((u+s-a[0][0],v+t-a[0][1])for u,v in a)-set(b):print(x,y);break
