#include <stdio.h>
#include <algorithm>

using namespace std;

typedef struct {
	int x, y;
} POINT;

bool operator< (const POINT& a, const POINT& b)
{
	if (a.x == b.x){
		return (a.y < b.y);
	}
	return (a.x < b.x);
}

int main(void)
{
	POINT pat[200];
	POINT all[1000];
	int allcnt, patcnt;
	int i, j;
	
	while (1){
		scanf("%d", &patcnt);
		
		if (patcnt == 0){
			break;
		}
		
		for (int i = 0; i < patcnt; i++){
			scanf("%d%d", &pat[i].x, &pat[i].y);
		}
		
		scanf("%d", &allcnt);
		for (int i = 0; i < allcnt; i++){
			scanf("%d%d", &all[i].x, &all[i].y);
		}
		
		sort(pat, pat + patcnt);
		sort(all, all + allcnt);
		
		for (i = 0; i + patcnt - 1 < allcnt; i++){
			int k;
			k = 0;
			for (j = 0; j < patcnt; j++){
				for (int l = 0; l < allcnt; l++){
					if (pat[j].x - pat[0].x == all[l].x - all[i].x && pat[j].y - pat[0].y == all[l].y - all[i].y){
						k++;
						break;
					}
				}
			}
			if (k == patcnt){
				break;
			}
		}
		
		printf("%d %d\n", all[i].x - pat[0].x, all[i].y - pat[0].y);
		
	}
	
	return (0);
}