#include "bits/stdc++.h"
using namespace std;
#define REP(i, s, n) for(signed i = (s); i < signed(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(co) co.begin(), co.end()
typedef pair<int, int> P;

signed main() {
	int m, n;
	while (cin >> m && m) {
		vector<P> stars(m);
		rep(i, m) cin >> stars[i].first >> stars[i].second;
		cin >> n;
		set<P> ss;
		rep(i, n) {
			int x, y; cin >> x >> y;
			ss.insert(P(x, y));
		}

		for (P p : ss) {
			int dx = p.first - stars[0].first, dy = p.second - stars[0].second;
			if (all_of(all(stars), [&](P& p) { return ss.count(P(p.first + dx, p.second + dy)); })) {
				cout << dx << " " << dy << endl;
				break;
			}
		}
	}
}