#include <iostream>
using namespace std;
int main() {
	while (1) {
		int m, mx[300] = { 0 }, my[300] = { 0 };
		cin >> m;
		if (m == 0) return 0;
		for (int i = 0; i < m; i++) {
			cin >> mx[i] >> my[i];
			if (i) {
				mx[i] -= mx[0];
				my[i] -= my[0];
			}
		}
		int n, nx[2000] = { 0 }, ny[2000] = { 0 };
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> nx[i] >> ny[i];
		}
		for (int i = 0; i < n; i++) {
			int ansx = nx[i] - mx[0];
			int ansy = ny[i] - my[0];
			bool bo = true;
			for (int j = 1; j < m; j++) {
				int sx = nx[i] + mx[j];
				int sy = ny[i] + my[j];
				int ct = 0;
				for (int k = 0; k < n; k++) {
					if (nx[k] == sx&&ny[k] == sy) ct++;
				}
				if (ct) continue;
				else {
					bo = false;
					break;
				}
			}
			if (bo) {
				cout << ansx << " " << ansy << endl;
				break;
			}
		}
	}
	return 0;
}