#include <iostream>
using namespace std;

int m;
int sx[200], sy[200];
int n;
int hx[1000], hy[1000];

int find(int tx, int ty) {
	for (int i = 0; i < m; i++) {
		bool flag = false;
		for (int j = 0; j < n; j++) {
			if (sx[i] + tx == hx[j] && sy[i] + ty == hy[j]) {
				flag = true;
				break;
			}
		}
		if (!flag) return false;
	}
	return true;
}

int main() {
	while (cin >> m) {
		if (!m) return 0;
		for (int i = 0; i < m; i++) cin >> sx[i] >> sy[i];
		cin >> n;
		for (int i = 0; i < n; i++) cin >> hx[i] >> hy[i];
		
		for (int i = 0; i < n; i++) {
			int tx = hx[i] - sx[0];
			int ty = hy[i] - sy[0];
			if (find(tx, ty)) {
				cout << tx << " " << ty << endl;
				break;
			}
		}
	}
	return 0;
}