//http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2676345#1
#include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<cstdio>
#include<fstream>
#include<cstring>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define P pair<int,int>
#define ll __int64
int m,n;
int x[400],y[400];
int x2[1111],y2[1111];
set<P>table;

bool sserch(int i,int j){
	int dx=x2[j]-x[i],dy=y2[j]-y[i];
	int nx,ny;
	for(int i=0;i<n;i++){
		nx=x[i]+dx;
		ny=y[i]+dy;
		if(table.find(mp(nx,ny))==table.end())return 0;
	}
	return 1;
}
int main(){

while(cin>>n,n){
table.clear();
memset(x,0,sizeof x);
memset(y,0,sizeof y);
memset(x2,0,sizeof x2);
memset(y2,0,sizeof y2);

rep(i,n)cin>>x[i]>>y[i];
cin>>m;
rep(i,m){
cin>>x2[i]>>y2[i];
table.insert(mp(x2[i],y2[i]));

}


int ax,ay;

	rep(j,m){
		if(sserch(0,j)){//図1のiと図2のjを視点にして探索
			ax=x2[j]-x[0];
			ay=y2[j]-y[0];
			cout<<ax<<" "<<ay<<endl;
		}
}
}

	return 0;
}
