#include<set>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int i,j;
  int m;
  while(cin>>m&&m){
    int a[200],b[200];
    for(i=0;i<m;i++)
      cin>>a[i]>>b[i];
    int n;
    cin>>n;
    set<pair<int,int> > c;
    for(i=0;i<n;i++){
      int p,q;
      cin>>p>>q;
      c.insert(make_pair(p,q));
    }
    set<pair<int,int> >::iterator it;
    for(it=c.begin();it!=c.end();it++){
      for(j=1;j<m;j++){
	if(c.count(make_pair(a[j]+(*it).first-a[0],b[j]+(*it).second-b[0]))==0)
	  break;
      }
      if(j==m)
	break;
    }
    cout<<(*it).first-a[0]<<" "<<(*it).second-b[0]<<endl;
  }
  return 0;
}