#include <bits/stdc++.h>
using namespace std;
long long movex[300], movey[300];
long long graphx[300];
long long graphy[300];
long long photox[1010];
long long photoy[1010];
void syoki() {
  for (long long i = 0; i < 300; i++) {
    movex[i] = 0;
    movey[i] = 0;
    graphx[i] = 0;
    graphy[i] = 0;
  }
  for (long long i = 0; i < 1010; i++) {
    photox[i] = 0;
    photoy[i] = 0;
  }
}
signed main() {
  long long m, n;
  long long x, y;
  while (1) {
    syoki();
    cin >> m;
    if (m == 0) break;
    for (long long i = 0; i < m; i++) {
      cin >> x >> y;
      graphx[i] = x;
      graphy[i] = y;
    }
    cin >> n;
    for (long long i = 0; i < n; i++) {
      cin >> x >> y;
      photox[i] = x;
      photoy[i] = y;
    }
    long long k = 0;
    for (long long i = 0; i < m; i++) {
      for (long long j = 0; j < n; j++) {
        movex[k] = photox[j] - graphx[i];
        movey[k] = photoy[j] - graphy[i];
        k++;
      }
    }
    long long cntx = 0;
    long long cnty = 0;
    long long ansx = 0, ansy = 0;
    sort(movex, movex + k);
    sort(movey, movey + k);
    for (long long i = 0; i < k; i++) {
      if (movex[i] == movex[i + 1])
        cntx++;
      else
        cntx = 0;
      if (movey[i] == movey[i + 1])
        cnty++;
      else
        cnty = 0;
      if (cntx == m - 1) ansx = movex[i];
      if (cnty == m - 1) ansy = movey[i];
      if (ansx && ansy) break;
    }
    cout << ansx << " " << ansy << endl;
  }
  return 0;
}
