#include <bits/stdc++.h>

using namespace std;
typedef pair<int, int> pii;

int main(void) {
  int m, n;
  while (cin >> m, m) {
    vector<pii> p(m);
    for (int i = 0; i < m; i++) {
      cin >> p[i].first >> p[i].second;
      if (!i) continue;
      p[i].first -= p[0].first;
      p[i].second -= p[0].second;
    }

    cin >> n;
    vector<pii> q(n);
    set<pii> st;
    for (int i = 0; i < n; i++) {
      cin >> q[i].first >> q[i].second;
      st.insert(q[i]);
    }

    for (int i = 0; i < n; i++) {
      for (int j = 1; j < m; j++) {
        pii r = pii(q[i].first + p[j].first, q[i].second + p[j].second);
        if (st.find(r) == st.end()) break;
        if (j != m - 1) continue;
        cout << q[i].first - p[0].first << " " << q[i].second - p[0].second << endl;
        i = n;
      }
    }
  }

  return 0;
}
