#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int n, m, a, b;
vector<pair<int, int>> stars, c;
int main() {
	while (cin >> m, m) {
		stars.clear();
		c.clear();
		cin >> a >> b;
		for (int i = 0; i < m - 1; i++) {
			int x, y; cin >> x >> y;
			c.push_back(make_pair(x - a, y - b));
		}
		cin >> n;
		for (int i = 0; i < n; i++) {
			int x, y; cin >> x >> y;
			stars.push_back(make_pair(x, y));
		}
		sort(stars.begin(), stars.end());
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m - 1; j++) {
				pair<int, int> p = make_pair(stars[i].first + c[j].first, stars[i].second + c[j].second);
				if (*lower_bound(stars.begin(), stars.end(), p) != p)goto joi2007;
			}
			cout << stars[i].first - a << ' ' << stars[i].second - b << endl;
		joi2007:;
		}
	end:;
	}
}