#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 pair<int,int> pii
#define INF 1<<29
#define MAX_M 201
#define MAX_N 1111
using namespace std;

int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N];
set<pii> st;
vector<pii> v;

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

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