#include <iostream>
#include <vector>
#include <map>
using namespace std;

typedef pair<int,int> P;
struct Point{int x,y;};

int main(){
	int n, m;
	while( cin >> m , m ){
		Point a[200], d[200];
		for(int i=0 ; i < m ; i++ ){
			int x, y;
			cin >> x >> y;
			a[i].x = x;
			a[i].y = y;
		}
		for(int i=0 ; i < m ; i++ ){
			d[i].x = a[i].x - a[0].x;
			d[i].y = a[i].y - a[0].y; 
		}
		
		map<P,bool> memo;
		Point b[1000];
		cin >> n;
		for(int i=0 ; i < n ; i++ ){
			int x, y;
			cin >> x >> y;
			b[i].x = x;
			b[i].y = y;
			memo[P(x,y)] = true;
		}
		for(int i=0 ; i < n ; i++ ){
			bool flag = true;
			int x = b[i].x;
			int y = b[i].y;
			for(int j=1 ; j < m ; j++ ){
				int mx = x + d[j].x;
				int my = y + d[j].y;
				if( !memo.count(P(mx,my)) ){
					flag = false;
					break;
				}
			}
			if( flag ){
				cout << (x - a[0].x) << " " << (y - a[0].y) << endl;
				break;
			}
		}
	}
}