#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
#define fr first
#define sc second
typedef pair< int , int > Pt;
int m, n;
bool serach( Pt *a, Pt *b, int& x,int& y){
  for(int j = 1 ; j < m ; j++ ){
    if(!binary_search(b,b+n,Pt(a[j].fr+x,a[j].sc+y))) return false;
  }
  return true;
}
int main(){
  while(cin >> m , m){
    Pt M[m];
    for(int i = 0 ; i < m ; i++ ) cin >> M[i].fr >> M[i].sc;
    cin >> n;
    Pt D[n];
    for(int i = 0 ; i < n ; i++ ) cin >> D[i].fr >> D[i].sc;
    sort(D,D+n);
    for(int i = 0 ; i < n ; i++ ){
      int x = D[i].fr - M[0].fr , y = D[i].sc - M[0].sc;
      if(serach(M,D,x,y)){
        cout << x << " " << y << endl;
        break;
      }
    }
  }
}