#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

typedef pair<int,int> P;

int n,m;
/*
bool operator == (const P &a, const P &b)const
{
	return (a.first == b.first) & (a.second == b.second);
}
*/
void solve()
{
	vector<P> model(n);
	vector<P> dist(n);
	for(int i = 0; i < n; i++)
		cin >> model[i].first >> model[i].second;
	for(int i = 0; i < n; i++){
		dist[i] = P(model[0].first - model[i].first, model[0].second - model[i].second);
		//cout << dist[i].first << ' ' << dist[i].second << endl;
	}
	sort(dist.begin(), dist.end() );

	cin >> m;
	vector<P> some(m);
	for(int j = 0; j < m; j++){
		cin >> some[j].first >> some[j].second;
	}

	for(int i = 0; i < m; i++){
		int c = 0;
		for(int j = 0; j < m; j++){
			P sdist = P(some[i].first - some[j].first, some[i].second - some[j].second);
			if(binary_search(dist.begin(), dist.end(), sdist)){
				c++;
				
			}
		}
		if(c == n){
			cout << some[i].first - model[0].first<< ' ' << some[i].second - model[0].second<< endl;
			break;
		}
		

	}




}

int main(void)
{
	while(cin >> n, n)
		solve();
	return 0;
}