#include<cstdio>
#include<algorithm>

std::pair<int, int> s[201], h[1001];
int x, y, m, n;

int main() {

	while (scanf("%d", &m), m != 0) {
		bool ok = true;
		int ansx = 0, ansy = 0;

		for (int i = 0; i < m; i++) {
			scanf("%d%d", &x, &y);
			s[i] = std::make_pair(x, y);
		}
		scanf("%d", &n);
		for (int i = 0; i < n; i++) {
			scanf("%d%d", &x, &y);
			h[i] = std::make_pair(x, y);
		}

		std::sort(h, h + n);

		for (int i = 0; i < n; i++) {
			x = h[i].first - s[0].first;
			y = h[i].second - s[0].second;
			ok = true;
			for (int j = 0; j < m; j++) {
				if (!std::binary_search(h, h + n, std::make_pair(s[j].first + x, s[j].second + y))) {
					ok = false;
				}
			}
			if (ok) {
				ansx = x;
				ansy = y;
				printf("%d %d\n", ansx, ansy);
			}
		}
		//printf("%d %d\n", ansx, ansy);
	}
	return 0;
}
