#include <iostream>
#include <algorithm>
#include <utility>
using namespace std;

#define repi(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) for(int i=0;i<(n);i++)

typedef pair<int, int> P;

#define mp make_pair
#define ft first
#define sd second

int m, n;
P s[200];
P ns[1000];

int main() {
	ios::sync_with_stdio(false);
	
	while(cin >> m, m) {
		rep(i, m) cin >> s[i].ft >> s[i].sd;
		cin >> n;
		rep(i, n) cin >> ns[i].ft >> ns[i].sd;
		sort(s, s+m);
		sort(ns, ns+n);
		int dx, dy;
		rep(i, n) {
			dx = ns[i].ft-s[0].ft;
			dy = ns[i].sd-s[0].sd;
			bool flg = true;
			repi(j, 1, m) {
				if(!binary_search(ns, ns+n, mp(s[j].ft+dx, s[j].sd+dy))) {
					flg = false;
					break;
				}
			}
			if(flg)break;
		}
		cout << dx << " " << dy << endl;
	}
	
	return 0;
}