#include<iostream>
#include<complex>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef complex<int> P;
int main(){
	int m,n,tx,ty; P a[200],b[1000];
	while(cin>>m,m){
		rep(i,m)cin>>tx>>ty,a[i]=P(tx,ty);
		cin>>n; rep(i,n)cin>>tx>>ty,b[i]=P(tx,ty);
		rep(i,n){
			P cp=b[i];
			rep(j,m-1){
				int f=0;
				rep(k,n)if(b[k]-cp==a[j+1]-a[j]){
					f=1;
					cp=b[k]; break;
				}
				if(!f)goto NEXT;
			}
			cout<<real(b[i]-a[0])<<" "<<imag(b[i]-a[0])<<endl; break;
			NEXT:;
		}
	}
	return 0;
}