#include<set>
#include<iostream>

#define	mp	make_pair
#define	X	first
#define	Y	second

using namespace std;

typedef	pair<int,int>	pii;

pii operator-(const pii &a,const pii &b){ return mp(a.X-b.X,a.Y-b.Y); }

int main()
{
	for(int m;cin>>m,m;){
		set<pii> star,sky;
		for(int i=0;i<m;i++){
			int x,y;	cin>>x>>y;
			star.insert(mp(x,y));
		}
		int n;	cin>>n;
		for(int i=0;i<n;i++){
			int x,y;	cin>>x>>y;
			sky.insert(mp(x,y));
		}

		pii shift;
		set<pii>::iterator it_sky,it_star;
		for(it_sky=sky.begin();it_sky!=sky.end();it_sky++){
			bool ok=true;
			shift=*star.begin()-*it_sky;
			for(it_star=star.begin();it_star!=star.end();it_star++){
				if(sky.count(*it_star-shift)==0){
						ok=false;
						break;
					}
			}
			if(ok)	break;
		}
		cout<<-shift.X<<' '<<-shift.Y<<endl;
	}

	return 0;
}