#include<iostream>
#include<set>
using namespace std;
int main()
{
  int n,sx,sy,x,y;
  bool f;
  set< pair<int,int> >asterism,star;
  set< pair<int,int> >::iterator it1,it2;
  while(cin>>n,n){
    asterism.clear();
    star.clear();

    cin>>sx>>sy;
    n--;
    while(n-->0){
      cin>>x>>y;
      x-=sx;y-=sy;
      asterism.insert(make_pair(x,y));
    }

    cin>>n;
    while(n-->0){
      cin>>x>>y;
      star.insert(make_pair(x,y));
    }

    for(it1=star.begin();it1!=star.end();it1++){
      f=true;
      for(it2=asterism.begin();it2!=asterism.end();it2++){
	if( star.count( make_pair(it1->first+it2->first,it1->second+it2->second) ) )continue;
	f=false;
      }
      if(f)break;
    }

    cout<<(it1->first - sx)<<" "<<(it1->second - sy)<<endl;
  }
}