#include <iostream>
#include <algorithm>
#include <utility>

using namespace std;
typedef pair<int, int> P;

P a[200], b[1000];

int main(){
	int m, n, x, y;
	bool r;

	while(cin >> m, m){
		for(int i = 0;i < m;++i){
			cin >> x >> y;
			a[i] = make_pair(x, y);
		}
		cin >> n;
		for(int i = 0;i < n;++i){
			cin >> x >> y;
			b[i] = make_pair(x, y);
		}
		sort(a, a + m);
		sort(b, b + n);

		P base = a[0];
		for(int i = 0;i < m;++i){
			a[i] = make_pair(a[i].first - base.first, a[i].second - base.second);
//			cout << a[i].first << " " << a[i].second << endl;
		}

		for(int i = 0;i < n;++i){
			P t = b[i];
			r = true;
			for(int j = 1;j < m && r;++j){
				P s = make_pair(t.first + a[j].first, t.second + a[j].second);
				r = r && binary_search(b, b + n, s);
			}
			if(r){
				cout << t.first - base.first << " " << t.second - base.second << endl;
				break;
			}
		}
	}
	return 0;
}