#include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define mk make_pair
#define s second
#define f first
using namespace std;
int main(){
  int n,m;
  while(cin>>n,n){
    pair<int,int>a[n];
    r(i,n)cin>>a[i].f>>a[i].s;
    cin>>m;
    pair<int,int>b[m];
    r(i,m)cin>>b[i].f>>b[i].s;
    set<pair<int,int> >se;
    r(i,m)se.insert(b[i]);
    r(i,m){
      int c=0,x,y;
      x=a[0].f-b[i].f;
      y=a[0].s-b[i].s;
      r(j,n)if(!se.count(mk(a[j].f-x,a[j].s-y)))c++;
      if(!c){
        cout<<-x<<' '<<-y<<endl;
        goto L;
      }
    }L:;
  }
}