#include <bits/stdc++.h>
using namespace std;
signed main() {
  int m, n;
  while (cin >> m && m) {
    vector<pair<int, int> > stars(m);
    for (signed i = (0); i < signed(m); i++)
      cin >> stars[i].first >> stars[i].second;
    cin >> n;
    set<pair<int, int> > ss;
    for (signed i = (0); i < signed(n); i++) {
      int x, y;
      cin >> x >> y;
      ss.emplace(x, y);
    }
    for (pair<int, int> p : ss) {
      int dx = p.first - stars[0].first, dy = p.second - stars[0].second;
      if (all_of(stars.begin(), stars.end(), [&](pair<int, int>& p) {
            return ss.count(pair<int, int>(p.first + dx, p.second + dy));
          })) {
        cout << dx << " " << dy << endl;
        break;
      }
    }
  }
}
