#include <iostream>
#include <set>
using namespace std;

const int MAX_M = 200;

int n, m;
set<pair<int, int> > stars;
pair<int, int> constellation[MAX_M + 1];

void solve() {
	for (set<pair<int, int> >::iterator it = stars.begin(); it != stars.end(); ++it) {
		const int dx = it->first - constellation[0].first;
		const int dy = it->second - constellation[0].second;
		for (int i = 0; i < m; i++) {
			int newX = constellation[i].first + dx;
			int newY = constellation[i].second + dy;
			if (stars.find(make_pair(newX, newY)) == stars.end()) {
				goto NEXT;
			}
		}
		cout << dx << ' ' << dy << endl;
		return;
NEXT:
		continue;
	}
}

int main () {
	int x, y;
	while (cin >> m, m) {
		stars.clear();
		for (int i = 0; i < m; i++) {
			cin >> x >> y;
			constellation[i] = make_pair(x, y);
		}
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> x >> y;
			stars.insert(make_pair(x, y));
		}
		solve();
	}
	return 0;
}