#include <cstdio>
#include <algorithm>
#include <utility>
using namespace std;

typedef pair<int,int> mp;

mp mpadd(mp a,mp b){
	return make_pair(a.first+b.first,a.second+b.second);
}
mp mpsub(mp a,mp b){
	return make_pair(a.first-b.first,a.second-b.second);
}

int main(void){
	for(;;){
		
		int m,n;
		mp lookf[205];
		mp dat[1005];
		
		scanf("%d",&m);
		if(m==0)break;
		for(int i=0;i<m;i++){
			scanf("%d%d",&(lookf[i].first),&(lookf[i].second));
		}
		scanf("%d",&n);
		for(int i=0;i<n;i++){
			scanf("%d%d",&(dat[i].first),&(dat[i].second));
		}
		
		for(int i=0;i<n;i++){
			mp diff=mpsub(lookf[0],dat[i]);
			
			for(int j=1;j<m;j++){
				for(int k=0;k<n;k++){
					if(lookf[j]==mpadd(dat[k],diff)){
						goto nextj;
					}
				}
				goto nexti;
nextj:;
			}
			printf("%d %d\n",-diff.first,-diff.second);
			break;
nexti:;
		}
	}
	return 0;
}
		
			