#include<cstdio>
#include<math.h>
#include<algorithm>
#include<string.h>


using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int N,M;
pair<int,int> A[202];
pair<int,int> DIFFA[202];
pair<int,int> B[1002];


int main(){
	while(1){
		scanf("%d",&N);
		if(N==0)break;
		rep(i,N){
			scanf("%d %d",&A[i].first,&A[i].second);
			DIFFA[i].first=A[i].first-A[0].first;
			DIFFA[i].second=A[i].second-A[0].second;
		}
		scanf("%d",&M);
		rep(i,M){
			scanf("%d %d",&B[i].first,&B[i].second);
		}
		int ans=-1;
		rep(i,M){
			rep(j,N){
				if(j==0)continue;
				int x=B[i].first+DIFFA[j].first;
				int y=B[i].second+DIFFA[j].second;
				bool s=false;
				rep(k,M){
					if(B[k].first==x&&B[k].second==y){s=true;break;}
				}
				if(!s)break;
				if(j==N-1){ans=i;break;}
			}
		}
		printf("%d %d\n",B[ans].first-A[0].first,B[ans].second-A[0].second);
	}
}