#include <iostream>
#include <set>
#include <utility>

using namespace std;

typedef pair<int, int> pii;

int main(){
	while(true){
		int m;
		cin >> m;
		if(m == 0){ break; }
		int bx, by;
		cin >> bx >> by;
		set<pii> stars;
		while(--m){
			int x, y;
			cin >> x >> y;
			stars.insert(pii(x - bx, y - by));
		}
		int n;
		cin >> n;
		set<pii> sky;
		while(n--){
			int x, y;
			cin >> x >> y;
			sky.insert(pii(x, y));
		}
		int ax = 0, ay = 0;
		for(set<pii>::iterator it = sky.begin(); it != sky.end(); it++){
			pii base = *it;
			set<pii>::iterator s = stars.begin();
			while(s != stars.end()){
				if(sky.find(pii((*s).first + base.first, (*s).second + base.second)) == sky.end()){
					break;
				}
				s++;
			}
			if(s == stars.end()){
				ax = base.first - bx;
				ay = base.second - by;
				break;
			}
		}
		cout << ax << " " << ay << endl;
	}
	return 0;
}