#include <bits/stdc++.h>
using namespace std;
int main() {
  while (1) {
    int m, n, ansx, ansy;
    pair<int, int> Mxy[201], Nxy[1001];
    vector<int> dx, dy;
    cin >> m;
    if (m == 0) {
      break;
    }
    for (int i = 0; i < m; i++) {
      cin >> Mxy[i].first >> Mxy[i].second;
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> Nxy[i].first >> Nxy[i].second;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        dx.push_back(Nxy[i].first - Mxy[j].first);
        dy.push_back(Nxy[i].second - Mxy[j].second);
      }
    }
    sort(dx.begin(), dx.end());
    sort(dy.begin(), dy.end());
    for (int i = 0; i < dx.size(); i++) {
      if (dx[i] == dx[i + 1] && dy[i] == dy[i + 1]) {
        for (int j = i; j < m - 1; j++) {
          if (dx[j] == dx[j + 1] && dy[j] == dy[j + 1]) {
            ansx = dx[i];
            ansy = dy[i];
            goto goal;
          } else {
            break;
          }
        }
      }
    }
  goal:
    cout << ansx << " " << ansy << endl;
  }
  return 0;
}
