#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  while (1) {
    cin >> m;
    if (m == 0) break;
    set<pair<long long, long long> > starset;
    int dx[205], dy[205], Mx[205], My[205], xax = 0, yax = 0;
    for (int i = 0; i < m; i++) {
      cin >> Mx[i] >> My[i];
      if (i) {
        dx[i] = Mx[i] - xax;
        dy[i] = My[i] - yax;
      } else {
        xax = Mx[i];
        yax = My[i];
      }
    }
    cin >> n;
    int Nx[1001], Ny[1001];
    for (int i = 0; i < n; i++) {
      cin >> Nx[i] >> Ny[i];
      starset.insert(make_pair(Nx[i], Ny[i]));
    }
    for (int i = 0; i < n; i++) {
      int j;
      for (j = 1; j <= m; j++) {
        if (starset.find(make_pair(Nx[i] + dx[j], Ny[i] + dy[j])) ==
            starset.end())
          break;
      }
      if (j == m + 1) {
        cout << Nx[i] - xax << " " << Ny[i] - yax << endl;
        break;
      }
    }
  }
}
