# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
constexpr int MOD = 1000000007;
constexpr int INF = 2000000000;
using namespace std;

int main() {
	int m;
	while (cin >> m&&m != 0) {
		vector<pair<int, int>> find_stars;
		vector<pair<int, int>> sky;
		int a, b;
		for (int i = 0; i < m; i++) {
			cin >> a >> b;
			find_stars.emplace_back(a, b);
		}
		int n;
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> a >> b;
			sky.emplace_back(a, b);
		}
		for (int i = 0; i < n; i++) {
			int ansx = sky[i].first - find_stars[0].first,ansy = sky[i].second - find_stars[0].second;
			int count = 0;
			for (int j = 0; j < m; j++) {
				for (int h = 0; h < n; h++) {
					if (sky[h].first - find_stars[j].first == ansx&&sky[h].second - find_stars[j].second == ansy)count++;
				}
			}
			if (count == m) {
				cout << ansx << " " << ansy << endl;
				break;
			}
		}
	}
}