#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int m, n;
  while (cin >> m && m) {
    int x, y;
    vector<pair<int, int> > search(m);
    for (int i = 0; i < m; i++) {
      cin >> x >> y;
      search[i] = make_pair(x, y);
    }
    cin >> n;
    vector<pair<int, int> > field(n);
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      field[i] = make_pair(x, y);
    }
    vector<pair<int, int> > d(m);
    for (int i = 1; i < m; i++) {
      d[i].first = search[i].first - search[0].first;
      d[i].second = search[i].second - search[0].second;
    }
    for (int i = 0; i < n; i++) {
      bool found = true;
      for (int j = 1; found && j < m; j++) {
        pair<int, int> q = field[i];
        q.first += d[j].first;
        q.second += d[j].second;
        if (find(field.begin(), field.end(), q) == field.end()) found = false;
      }
      if (found) {
        cout << field[i].first - search[0].first << " "
             << field[i].second - search[0].second << endl;
        break;
      }
    }
  }
  return 0;
}
