#include<stdio.h>
#include<stdlib.h>
#include<math.h>
typedef struct{
	int x;
	int y;
}point;
point mp[200],np[1000],up[200];
int c;
int n,m;
int i,j;
int comp(const void* a,const void* b){
	point* p=(point*)a;
	point* q=(point*)b;
	return p->x-q->x;
}
bool search(point a[],int n,int b,int c){
	int r=0;
	int l=n-1;
	int mid;
	for(int k=0;k<20;k++){
		mid=(int)(r+l)/2;
		if(abs(a[mid].x-b)>abs(a[mid+1].x-b))mid=mid+1;
		if(a[mid].x==b){
			while(a[mid].x==b)mid--;
			for(int l=mid+1;a[l].x==b;l++){
				if(a[l].y==c)return true;
			}
			return false;
		}
		else if(a[mid].x>b)l=mid;
		else r=mid;
	}
	return false;
}


int main(){
	while(1){
		scanf("%d",&m);
		if(m==0)return 0;
		for(i=0;i<m;i++){
			scanf("%d %d",&mp[i].x,&mp[i].y);
			if(i!=0){
				mp[i].x-=mp[0].x;
				mp[i].y-=mp[0].y;
			}
		}
		scanf("%d",&n);
		for(i=0;i<n;i++)scanf("%d %d",&np[i].x,&np[i].y);
		qsort(np,n,sizeof(point),comp);
		for(i=0;i<n;i++){
			c=0;
			for(j=1;j<m;j++)if(search(np,n,np[i].x+mp[j].x,np[i].y+mp[j].y)){
				c++;
			}
			if(c==m-1)break;
		}
		printf("%d %d\n",np[i].x-mp[0].x,np[i].y-mp[0].y);
	}
}
	