#include <iostream>
#include <map>
#include <vector>

#define X first
#define Y second

using namespace std;

int main(void){
	int n;
	int x,y;
	
	while(cin >> n && n){
		vector<pair<int,int> > pattern;
		vector<pair<int,int> > stars;
		map<pair<int,int>, bool> isExist;
		for(int i=0;i<n;i++){
			cin >> x >> y;
			pattern.push_back(make_pair(x,y));
		}
		
		cin >> n;
		for(int i=0;i<n;i++){
			cin >> x >> y;
			isExist[make_pair(x,y)] = true;
			stars.push_back(make_pair(x,y));
		}
		
		//for all stars
		for(int i=0;i<stars.size();i++){
			vector<pair<int,int> > working;

			//calculate diffence
			int dx = stars[i].X - pattern[0].X;
			int dy = stars[i].Y - pattern[0].Y;
			
			working = pattern;
			for(int j=0;j<working.size();j++){
				working[j].X += dx;
				working[j].Y += dy;
			}
			
			bool isok = true;
			for(int j=0;j<working.size();j++){
				if(!isExist[working[j]]){
					isok = false;
					break;
				}
			}
			if(isok){
				cout << dx << " " << dy << endl;
				break;
			}
		}
	}
}