#include<iostream>
#include<set>
#include<utility>
#define MP(a,b) make_pair(a,b)
using namespace std;

set<pair<int,int> > a,b;
bool ok(int dx,int dy){
	set<pair<int,int> >::iterator it;
	for(it=a.begin();it!=a.end();++it){
		if(b.find(MP(dx+it->first,dy+it->second)) == b.end())return false;	
	}
	return true;
}
int main(){
	int m,n;
	while(cin>>m,m){
		int x,y;
		a.clear();
		b.clear();
		for(int i=0;i<m;i++){
			cin>>x>>y;
			a.insert(MP(x,y));
		}
		cin>>n;
		for(int i=0;i<n;i++){
			cin>>x>>y;
			b.insert(MP(x,y));
		}
		int dx,dy;
		set<pair<int,int> >::iterator it1,it2;
		for(it1=a.begin();it1!=a.end();++it1){
			for(it2=b.begin();it2!=b.end();++it2){
				dx=it2->first - it1->first;
				dy=it2->second - it1->second;
				if(ok(dx, dy)){
					goto BREAK;
				}
			}
		}BREAK:
		cout<<dx<<' '<<dy<<endl;
	}
	return 0;
}