#include <stdio.h>
#include <algorithm>

int m, want_find[212][2], n, stars[1123][2];
bool found_flag = false;
int memo[2], ans[2];

int main(void) {
	while (true) {
		scanf("%d", &m);
		if (m == 0) { break; }
		for (int i = 0; i < m; ++i) { scanf("%d%d", &want_find[i][0], &want_find[i][1]); }
		scanf("%d", &n);
		for (int i = 0; i < n; ++i) { scanf("%d%d", &stars[i][0], &stars[i][1]); }

		for (int i = 1; i < m; ++i) {
			want_find[i][0] -= want_find[0][0];
			want_find[i][1] -= want_find[0][1];
		}
		memo[0] = want_find[0][0], memo[1] = want_find[0][1];
		want_find[0][0] = want_find[0][1] = 0;
		for (int i = 0; i < n; ++i) {
			for (int j = 1; j < m; ++j) {
				found_flag = false;
				for (int k = 0; k < n; ++k) {
					if (stars[i][0] + want_find[j][0] == stars[k][0] ||
						stars[i][1] + want_find[j][1] == stars[k][1]) {
						found_flag = true;
						break;
					}
				}
				if (found_flag == false) { break; }
			}
			if (found_flag == true) {
				ans[0] = stars[i][0] - memo[0];
				ans[1] = stars[i][1] - memo[1];
				break;
			}
		}
		printf("%d %d\n", ans[0], ans[1]);
	}
	return 0;
}