#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int m, n;
  while (cin >> m && m) {
    vector<pair<int, int> > v(m);
    int a, b;
    for (int i = (0); i < (int)(m); i++) {
      cin >> v[i].first >> v[i].second;
      if (i == 0) a = v[0].first, b = v[0].second;
      v[i].first -= a, v[i].second -= b;
    }
    cin >> n;
    pair<int, int> p;
    set<pair<int, int> > st;
    for (int i = (0); i < (int)(n); i++) {
      cin >> p.first >> p.second;
      p.first -= a;
      p.second -= b;
      st.insert(p);
    }
    bool f;
    for (auto it = st.begin(); it != st.end(); it++) {
      f = true;
      for (int i = (0); i < (int)(m); i++) {
        if (st.count(pair<int, int>(it->first + v[i].first,
                                    it->second + v[i].second)) == 0) {
          f = false;
          break;
        }
      }
      if (f) {
        cout << it->first << " " << it->second << endl;
        break;
      }
    }
  }
}
