#include<iostream>
#include <algorithm>
#include <cstdlib>
#define INF 1<<30
using namespace std;
int main(){
  for(;;){
    int m;
    cin >> m;
    if(m==0){
      break;
    }
    pair<int, int> s[m];
    for(int i=0; i<m; i++){
      int temp, temp2;
      cin >> temp >> temp2;
      s[i] = make_pair(temp, temp2);
    }
    int dx, dy, n;
    cin >> n;
    pair<int, int> d[n];
    for(int i=0; i<n; i++){
      int temp, temp2;
      cin >> temp >> temp2;
      d[i] = make_pair(temp, temp2);
    }
    sort(d,d+n);
    pair<int, int> l[m];
    for(int i=0; i<n; i++){
      dx = d[i].first-s[0].first;
      dy = d[i].second-s[0].second;
      for(int j=0; j<m; j++){
        l[j].first =  s[j].first + dx;
        l[j].second = s[j].second + dy;
        if(binary_search(d, d+n, l[j])==0){
          break;
        }
        if(binary_search(d, d+n, l[m-1])==1){
          cout << dx << " " << dy << endl;
          l[m-1]= make_pair(INF, INF);

        }
      }
    }

  }

}

