#include <bits/stdc++.h>
using namespace std;
int x[201], y[201], xx[1111], yy[1111];
void solve() {
  int m, n;
  for (;;) {
    cin >> m;
    if (!m) break;
    set<pair<int, int> > st;
    vector<pair<int, int> > v;
    for (int i = 0; i < (int)(m); i++) cin >> x[i] >> y[i];
    cin >> n;
    for (int i = 0; i < (int)(n); i++) {
      cin >> xx[i] >> yy[i];
      st.insert(make_pair(xx[i], yy[i]));
    }
    for (int i = 0; i < (int)(m); i++) {
      v.push_back(make_pair(x[i] - x[0], y[i] - y[0]));
    }
    set<pair<int, int> >::iterator ite;
    for (int i = 0; i < (int)(n); i++) {
      bool f = true;
      for (int j = 0; j < (int)(v.size()); j++) {
        ite = st.find(make_pair(v[j].first + xx[i], v[j].second + yy[i]));
        if (ite == st.end()) {
          f = false;
          break;
        }
      }
      if (f) {
        cout << xx[i] - x[0] << yy[i] - y[0] << endl;
        break;
      }
    }
  }
}
int main() {
  solve();
  return 0;
}
