#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <queue>
#include <map>
#include <functional>
#include <cstring>
using namespace std;
struct data{
	int x,y;
	data(){}
	data(int x,int y):x(x),y(y){}
};
int main() {
	int n;
	while(scanf("%d",&n) ,n){
		int m;
		vector<data> star;
		vector<data> map;
		for(int i = 0; i < n; i++){
			int x,y;
			scanf("%d%d",&x,&y);
			star.push_back(data(x,y));
		}
		scanf("%d",&m);
		for(int i = 0; i < m; i++){
			int x,y;
			scanf("%d%d",&x,&y);
			map.push_back(data(x,y));
		}
		for(int i = 0; i < m; i++){
			int dx = map[i].x - star[0].x,dy = map[i].y - star[0].y;
			int cnt = 0;
			for(int j = 0 ; j < n; j++){
				for(int k = 0; k < m; k++){
					if(star[j].x + dx == map[k].x && star[j].y + dy == map[k].y){
						cnt++;
					}
				}
			}
			if(cnt == n){
				printf("%d %d\n",dx,dy);
				break;
			}
		}
	}
    return 0;
}