#include <cstdio>
#include <algorithm>
#include <utility>
using namespace std;

int n,m;
pair<int,int> con[200],str[1000];

int main(){
	while(scanf("%d",&m), m != 0){
		for(int i = 0; i < m ; i++){
			scanf("%d%d",&con[i].first,&con[i].second);
		}
		scanf("%d",&n);
		for(int i = 0; i < n; i++){
			scanf("%d%d",&str[i].first,&str[i].second);
		}			
	
		sort(con,con+m);
		sort(str,str+n);
		
		pair<int,int> d;
		for(int i = 0; i < n; i++){
			int dx = str[i].first - con[0].first, dy = str[i].second - con[0].second;
			d = pair<int,int>(dx,dy);
			bool ok = true;
			for(int j = 1; j < m; j++){
				pair<int,int> rl(con[j].first + dx, con[j].second + dy);
				if(!binary_search(str,str+n,rl)){
					ok = false;
					break;
				}
			}
			if(ok){
				break;
			}
		}
		printf("%d %d\n",d.first,d.second);
	}
	return 0;
}