#include <stdio.h>
#include <string.h>

int find_x[300];
int find_y[300];
int star_x[1234];
int star_y[1234];
int find_flag;

int main(){
	while (1){
		memset(find_x, 0, sizeof(find_x));
		memset(find_y, 0, sizeof(find_y));
		memset(star_x, 0, sizeof(star_x));
		memset(star_y, 0, sizeof(star_y));
		int m, n;
		int move_x, move_y;
		scanf("%d", &m);
		if (m == 0)return 0;
		for (int a = 0; a < m; a++){
			scanf("%d%d", &find_x[a], &find_y[a]);
		}
		scanf("%d", &n);
		for (int a = 0; a < n; a++){
			scanf("%d%d", &star_x[a], &star_y[a]);
		}
		for (int a = 0; a < n; a++){
			move_x = star_x[a] - find_x[0];
			move_y = star_y[a] - find_y[0];
			for (int b = 0; b < m; b++){
				find_flag = 0;
				for (int c = 0; c < n; c++){
					if (move_x + find_x[b] == star_x[c] &&
						move_y + find_y[b] == star_y[c]){
						find_flag = 1;
						break;
					}
				}
				if (find_flag == 0){
					break;
				}
			}
			if (find_flag == 1) break;
		}
		printf("%d %d\n", move_x, move_y);
	}
	return 0;
}