#include <bits/stdc++.h>
using namespace std;

#define loop(i,n) for(int i=0;i<n;i++)
typedef pair<int, int> P;
P p[202];
P q[1002];

int main(){
	int m, n, x, y;
	cin >> m;
	while (m){
		loop(i, m){
			cin >> x >> y;
			p[i] = P(x, y);
		}
		cin >> n;
		loop(i, n){
			cin >> x >> y;
			q[i] = P(x, y);
		}
		sort(p, p + m);
		sort(q, q + n);
		loop(j, n){
			int dx = q[j].first - p[0].first;
			int dy = q[j].second - p[0].second;
			bool f = 1;
			loop(i, m){
				if (i == 0)continue;
				if (!binary_search(q, q + n, P(p[i].first + dx, p[i].second + dy))){
					f = 0;
					break;
				}
			}
			if (f){
				cout << dx << " " << dy << endl;
				break;
			}
		}
		cin >> m;
	}
	return 0;
}