#include<iostream>
using namespace std;
int a[1000], b[1000], x[1000], y[1000], n, m;
int main() {
	while (true) {
		cin >> m; if (m == 0)break;
		for (int i = 0; i < m; i++)cin >> a[i] >> b[i];
		cin >> n;
		for (int i = 0; i < n; i++)cin >> x[i] >> y[i];
		for (int i = 0; i < n; i++) {
			int Gx = x[i] - a[0], Gy = y[i] - b[0];
			bool flag = true;
			for (int j = 0; j < m; j++) {
				int Hx = Gx + a[j], Hy = Gy + b[j];
				bool OK = false;
				for (int k = 0; k < n; k++) {
					if (x[k] == Hx && y[k] == Hy)OK = true;
				}
				if (OK == false)flag = false;
			}
			if (flag == true) { cout << Gx << ' ' << Gy << endl; }
		}
	}
	return 0;
}