#include<stdio.h>
#include<algorithm>
using namespace std;
typedef pair<int, int>P;

int main(){
	int m, n, x, y, i;
	P a[200], b[1000];
	scanf("%d", &m);
	if (!m)return 0;
	for (int i = 0; i < m; i++) {
		scanf("%d%d", &x, &y);
		a[i] = P(x, y);
	}
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d%d", &x, &y);
		b[i] = P(x, y);
	}
	sort(a, a + m);
	sort(b, b + n);
	for (int i = 1; i < m; i++)
		a[i] = P(a[i].first - a[0].first, a[i].second - a[0].second);
	for (i = 0; i < n; i++) {//??????????????????
		bool flag = true;
		for (int j = 1; j < m; j++) {
			if (!binary_search(b, b + n, P(b[i].first + a[j].first, b[i].second + a[j].second)))
				flag = false;
		}
		if (flag)break;
	}
	printf("%d %d\n", b[i].first - a[0].first, b[i].second - a[0].second);
	main();
}