#include <stdio.h>

int main(void) {
	long int SC[200][2], buf[200][2], stars[1000][2];
	long int cou = 0, sa[2];
	int n,m,i,c,k;
	
	while(scanf("%d", &m)){
	if(m == 0) break;
	for(i = 0; m > i; i++){
		scanf("%ld%ld", &SC[i][0], &SC[i][1]);
	}
	scanf("%d", &n);
	for(i = 0; n > i; i++){
		scanf("%ld%ld", &stars[i][0], &stars[i][1]);
	}
	for(i = 0; n > i; i++){
		sa[0] = stars[i][0] - SC[0][0];
		sa[1] = stars[i][1] - SC[0][1];
		cou = 0;
		for(c = 0; m > c; c++){
			for(k = 0; n > k; k++){
				if(SC[c][0] + sa[0] == stars[k][0] && SC[c][1] + sa[1] == stars[k][1]){
					cou++;
					break;
				}
			}
		}
		if(cou == m){
			printf("%ld %ld\n", sa[0], sa[1]);
			break;
		} 
		
	}
	}
	return 0;
}