#include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ZERO(a) memset(a,0,sizeof(a))
#define len(a) sizeof(a)
#define ll long long
#define pii pair<int,int>
#define INF 1<<29
#define MAX_M 201
#define MAX_N 1111
using namespace std;

int x[MAX_M],y[MAX_M],xx[MAX_N],yy[MAX_N];

void solve(){
 int m,n;
 for(;;){
  cin>>m;
  if(!m) break;
  set<pii> st;
  vector<pii> v;
  FOR(i,m) cin>>x[i]>>y[i];
  cin>>n;
  FOR(i,n){
   cin>>xx[i]>>yy[i];
   st.insert(mp(xx[i],yy[i]));
  }
  FOR(i,m){
   v.pb(mp(x[i]-x[0],y[i]-y[0]));
  }
  set<pii>::iterator ite;
  FOR(i,n){
   bool f=true;
   FOR(j,v.size()){
    ite=st.find(mp(v[j].first+xx[i],v[j].second+yy[i]));
    if(ite==st.end()){
     f=false;
     break;
    }
   }
   if(f){
    cout<<xx[i]-x[0]<<" "<<yy[i]-y[0]<<endl;
    break;
   }
  }
 }
}

int main(){
 solve();
 return 0;
}