#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x[10000][2], y[10000][2], x2, y2, c, a;
  while (true) {
    cin >> m;
    if (m == 0) {
      break;
    }
    for (int i = 0; i < m; i++) {
      cin >> x[i][0] >> y[i][0];
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x[i][1] >> y[i][1];
    }
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) {
        a = 0;
        x2 = x[j][1] - x[i][0];
        y2 = y[j][1] - x[i][0];
        for (int k = 0; k < m; k++) {
          c = 0;
          for (int l = 0; l < n; l++) {
            if (x[k][0] + x2 == x[l][1] && y[k][0] + y2 == y[l][1]) {
              c++;
              goto Exit1;
            }
          }
        Exit1:;
          if (c == 0) {
            goto Exit2;
          }
          a++;
        }
      Exit2:;
        if (a == m) {
          goto Exit3;
        }
      }
    }
  Exit3:;
    cout << x2 << ' ' << y2 << endl;
  }
  return 0;
}
