#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
using namespace std;

typedef pair <int, int> P;
#define fir first
#define sec second

int main(void)
{
	int m, n, i, j;
	while (cin >> n, n){
		vector <P> star, chart;
		P a;
		for (i = 0; i < n; i++) {
			cin >> a.fir >> a.sec;
			chart.push_back(a);
		}
		cin >> m;
		for (i = 0; i < m; i++)	{
			cin >> a.fir >> a.sec;
			star.push_back(a);
		}
		sort(chart.begin(), chart.end());
		sort(star.begin(), star.end());
		
		for (i = 0; i < m; i++){
			int cnt = 0;
			for (j = 0; j < m; j++){
				a = star[j];
				a.fir += (chart[0].fir - star[i].fir);
				a.sec += (chart[0].sec - star[i].sec);
				if (chart[cnt] == a) cnt++;
				if (cnt == n) break;
			}
			if (cnt == n){
				cout << star[i].fir - chart[0].fir << " " << star[i].sec - chart[0].sec << endl;
			}
		}
	}
	
	return 0;
}