#include <iostream>
#include <utility>
#include <vector>
#include <set>
using namespace std;

int main(){
  int m;
  while(cin >> m, m){
    vector<pair<int,int>> C;
    for(int i = 0; i < m; ++i){
      int x, y;
      cin >> x >> y;
      C.emplace_back(x,y);
    }
    int n;
    cin >> n;
    set<pair<int,int>> D;
    for(int i = 0; i < n; ++i){
      int x, y;
      cin >> x >> y;
      D.emplace(x,y);
    }
    for(auto p : D){
      int dx = p.first-C[0].first;
      int dy = p.second-C[0].second;
      bool f = true;
      for(int j = 0; j < m; ++j){
        auto q = C[j];
        q.first += dx, q.second += dy;
        if(!D.count(q)){
          f = false;
          break;
        }
      }
      if(f){
        cout << dx << " " << dy << endl;
        break;
      }
    }
  }
}

