#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;

int main()
{
	int m;
	while (cin >> m, m) {
		vector<int> x(m), y(m);
		for (int i = 0; i < m; i++) {
			cin >> x[i] >> y[i];
		}
		int n;
		cin >> n;
		set<pii> st;
		for (int i = 0; i < n; i++) {
			int a, b;
			cin >> a >> b;
			st.emplace(a, b);
		}
		for (auto p : st) {
			int cx = p.first - x[0], cy = p.second - y[0];
			bool ok = true;
			for (int i = 1; i < m; i++) {
				if (!st.count(pii(x[i] + cx, y[i] + cy))) {
					ok = false;
					break;
				}
			}
			if (ok) {
				cout << cx << ' ' << cy << endl;
				break;
			}
		}
	}
	return 0;
}

