#include<set>
#include<queue>
#include<utility>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<numeric>
#include<functional>
#include<string>
#include<iostream>
using namespace std;
const long long int one = 1;
const long long int big = (one<<40);
typedef long long int llint;
bool solve(void){
	int n,m,i,x,y,gx,gy,ok;
	set<pair<llint,llint>> Ms;
	set<pair<llint,llint>> Ns;
	scanf("%d",&m);
	if(m==0){return false;}
	for(i=0;i<m;i++){
		scanf("%d %d",&x,&y);
		Ms.insert(make_pair(x,y));
		if(i==0){gx=x;gy=y;}
	}
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&x,&y);
		Ns.insert(make_pair(x,y));
	}
	for(auto it=Ns.begin();it!=Ns.end();it++){
		x=it->first-gx;
		y=it->second-gy;
		ok=1;
		for(auto its=Ms.begin();its!=Ms.end();its++){
			if(Ns.find(make_pair(its->first+x,its->second+y))==Ns.end()){
				ok=0;break;
			}
		}
		if(ok==1){printf("%d %d\n",x,y);}
	}
	return true;
}
int main(void){while(solve()){}return 0;}