#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

struct Pos { 
	int x, y;
	Pos(int a, int b) { x = a, y = b; }
	
};

bool same(Pos a, Pos b) {
	return a.x == b.x && a.y == b.y;
}

int n, m;
vector<Pos> seiza;
vector<Pos> sky;

int main() {
	while (1) {
		cin >> n;
		if (n == 0)break;
		int a, b;
		cin >> a >> b;
		for (int i = 1; i < n; i++) {
			int c, d;
			cin >> c >> d;
			seiza.push_back(Pos(c - a, d - b));
		}
		cin >> m;
		for (int i = 0; i < m; i++) {
			int c, d;
			cin >> c >> d;
			sky.push_back(Pos(c, d));
		}
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n - 1; j++) {
				Pos tmp(sky[i].x + seiza[j].x, sky[i].y + seiza[j].y);
				bool f = false;
				for (int k = 0; k < m; k++) {
					if (same(tmp, sky[k]))f = true;
				}
				if (!f)goto next;
			}
			cout << sky[i].x - a << " " << sky[i].y - b << endl;
		next:;
		}
		seiza.clear(), sky.clear();
	}
	return 0;
}