#include <bits/stdc++.h>

using namespace std;

int N, M;
int ConstellationX[200], ConstellationY[200], StarX[1000], StarY[1000];
bool StarXInfo[2000001], StarYInfo[2000001];

void solve(int &dx, int &dy) {
	bool flag;

	for (int i = 0; i < N; ++i) {
		dx = StarX[i] - ConstellationX[0];
		dy = StarY[i] - ConstellationY[0];
		flag = true;
		for (int j = 1; j < M; ++j) {
			if (!StarXInfo[ConstellationX[j] + dx] || !StarYInfo[ConstellationY[j] + dy]) {
				flag = false;
				break;
			}
		}
		if (flag) {
			return;
		}
	}
}

int main() {
	int x, y;
	
	while (cin >> M, M) {
		memset(StarXInfo, false, sizeof(StarXInfo));
		memset(StarYInfo, false, sizeof(StarYInfo));
		for (int i = 0; i < M; ++i) {
			cin >> x >> y;
			ConstellationX[i] = x;
			ConstellationY[i] = y;
		}
		cin >> N;
		for (int i = 0; i < N; ++i) {
			cin >> x >> y;
			StarX[i] = x;
			StarY[i] = y;
			StarXInfo[x] = true;
			StarYInfo[y] = true;
		}
		solve(x, y);
		cout << x << " " << y << endl;
	}

	return 0;
}
