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

#define X first
#define Y second
typedef pair<int, int> P;
typedef vector<P> vp;


int main() {
	int m, n;
	while(cin >> m && m){
		int x, y;
		vp mstars;
		for(int i = 0; i < m; ++i){
			scanf("%d %d", &x, &y);
			mstars.push_back(P(x, y));
		}
		cin >> n;
		vp nstars;
		for(int i = 0; i < n; ++i){
			scanf("%d %d", &x, &y);
			nstars.push_back(P(x, y));
		}
		sort(mstars.begin(), mstars.end());
		sort(nstars.begin(), nstars.end());
		bool ok = false;
		for(int i = 0; i < n; ++i){
			for(int j = 0; j < m; ++j){
				int dx = nstars[i].X - mstars[j].X;
				int dy = nstars[i].Y - mstars[j].Y;
				for(int k = 0; k < m; ++k){
					if(j == k)
						continue;
					if(!binary_search(nstars.begin(), nstars.end(), P(mstars[k].X + dx, mstars[k].Y + dy)))
						break;
					if(k == m - 1){
						cout << dx << " " << dy << endl;
						ok = true;
					}
				}
				if(ok)
					break;
			}
			if(ok)
				break;
		}
	}
	return 0;
}