#include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
struct XY{
int x,y;
};
int main(){
while(1){
int i,j,m,n,X,Y,a,b,cnt,r;
struct XY w[200],p[1000];
scanf("%d",&m);
if(m==0)return 0;
for(i=0;i<m;i++){
scanf("%d%d",&w[i].x,&w[i].y);
if(i!=0){
w[i].x=w[i].x-w[0].x;
w[i].y=w[i].y-w[0].y;
}
}
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%d",&p[i].x,&p[i].y);
for(i=0;i<n;i++){
cnt=1;
for(j=1;j<m;j++){
for(r=0;r<n;r++){
if(p[r].x==p[i].x+w[j].x&&p[r].y==p[i].y+w[j].y)
cnt++;
}
}
if(cnt==m){
X=p[i].x-w[0].x;
Y=p[i].y-w[0].y;
break;
}
}
printf("%d %d\n",X,Y);
}
return 0;
}

