#include <iostream>
#include <algorithm>
#include <utility>
#include <vector>

using namespace std;

typedef pair<int,int> Pa;

int main()
{
	int n, m, s, t;
	
	while(1){
		cin >> n;
		if(n == 0){
			break;
		}
		vector<Pa> vec, vec2;
		for(int i = 0; i < n; i++){
			cin >> s >> t;
			vec.push_back(Pa(s,t));
		}
		sort(vec.begin(), vec.end());
		
		cin >> m;
		for(int i = 0; i < m; i++){
			cin >> s >> t;
			vec2.push_back(Pa(s,t));
		}
		sort(vec2.begin(), vec2.end());
		
		for(int i = 0; i < m; i++){
			s = vec2[i].first - vec[0].first;
			t = vec2[i].second - vec[0].second;
			int c = 1;
			for(int j = i+1; j < m; j++){
				if(s == vec2[j].first - vec[c].first && t == vec2[j].second - vec[c].second){
					c++;
					if(c == n){
						break;
					}
				} else if(s < vec2[j].first - vec[c].first){
					break;
				}
			}
			
			if(c == n){
				cout << s << " " << t << endl;
				break;
			}
		}
	}
	
	return 0;
}