#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

struct Vector2{
	int x;
	int y;
};

Vector2 sample[1000];

Vector2 star[10000];

Vector2 ans, par;

int main(){
	int m, n;
	while(true){
		cin >> m;
		if(m == 0){
			break;
		}
		for(int i = 0; i < m; i++){
			cin >> sample[i].x >> sample[i].y;
		}
		cin >> n;
		for(int i = 0; i < n; i++){
			cin >> star[i].x >> star[i].y;
		}
		ans.x = 0;
		ans.y = 0;
		bool checker;
		for(int i = 0; i < n; i++){
			par.x = sample[0].x - star[i].x;
			par.y = sample[0].y - star[i].y;
			for(int j = 1; j < m; j++){
				checker = false;
				for(int k = 0; k < n; k++){
					if(sample[j].x == star[k].x + par.x && sample[j].y == star[k].y + par.y){
						checker = true;
						break;
					}
				}
				if(!checker){
					break;
				}
				if(j == m - 1){
					ans.x = par.x;
					ans.y = par.y;
				}
			}
		}
		printf("%d %d\n", -ans.x, -ans.y);
	}
	return 0;
}