#include<iostream>
#include<set>
using namespace std;
int main(){
	typedef pair<int,int>P;
	typedef set<P>Set;
	int n,m,i,x,y;
	for(;cin>>m,m;){
		Set cns,photo;
		for(i=m;i--;){
			cin>>x>>y;
			cns.insert(P(x,y));
		}
		cin>>n;
		for(i=n;i--;){
			cin>>x>>y;
			photo.insert(P(x,y));
		}
		for(Set::iterator itp=photo.begin();itp!=photo.end();++itp){
			Set::iterator itc=cns.begin();
			int dx=itp->first-itc->first,dy=itp->second-itc->second;
			for(;++itc!=cns.end();){
				if(photo.find(P(itc->first+dx,itc->second+dy))==photo.end())
					break;
			}
			if(itc==cns.end()){
				cout<<dx<<" "<<dy<<endl;
				break;
			}
		}
	}
}