#include <iostream>
#include <vector>
#include <set>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define X first
#define Y second

typedef pair<int,int> coord;

class t_res{
	public:
	bool flag;
	int x;
	int y;
};
vector<coord> want;
set<coord> all;


t_res find(int x,int y){
	coord check;
	t_res ret;
	int xx = x-want[0].X;
	int yy = y-want[0].Y;
	//cout << xx << " "  << yy << endl;
	rep(i,want.size()){
		check.X = want[i].X + xx;
		check.Y = want[i].Y + yy;
		if(all.find(check) == all.end() ){
			ret.flag = false;
			return ret;
		}
	}
	ret.flag = true;
	ret.x = xx;
	ret.y = yy;
	return ret;
}
int main(){
	int n,m;
	pair<int,int> inp,t;
	t_res get;
	while(cin >> n,n){
		want.resize(n);
		all.clear();
		rep(i,n){
			cin >> want[i].X >> want[i].Y;
		}
		cin >> m;
		rep(i,m){
			cin >> inp.X >> inp.Y;
			all.insert(make_pair(inp.X,inp.Y));
		}
		set<coord>::iterator it = all.begin();
		while( it != all.end() ){
			t = (*it);
			get = find(t.X,t.Y);
			if(get.flag){
				cout << get.x << " " << get.y << endl;
			}
			++it;
		}
	}
}