#include <bits/stdc++.h>
using namespace std;
int seiza[201][2], star[1000][2], n, m, dx, dy, x, y, a;
int main() {
  for (;;) {
    int seiza[201][2], star[1000][2], n, m, dx = 0, dy = 0, x, y, a = 0;
    cin >> n;
    if (n == 0) break;
    for (int i = 0; i < n; i++) {
      cin >> seiza[i][0] >> seiza[i][1];
    }
    cin >> m;
    for (int i = 0; i < m; i++) {
      cin >> star[i][0] >> star[i][1];
    }
    for (int i = 0; i < m; i++) {
      dx = star[i][0] - seiza[0][0];
      dy = star[i][1] - seiza[0][1];
      for (int j = 0; j < m; j++) {
        int c = 0;
        if (star[i][0] == seiza[0][0] + dx && star[i][1] == seiza[0][1] + dy) {
          for (int k = 1; k < n; k++) {
            for (int l = 0; l < m; l++) {
              if (star[l][0] == seiza[k][0] + dx &&
                  star[l][1] == seiza[k][1] + dy) {
                c++;
                break;
              }
            }
            if (c == n - 1) break;
          }
        }
        if (c == n - 1) {
          a = c;
          break;
        }
      }
      if (a == n - 1) break;
    }
    cout << dx << " " << dy << endl;
  }
}
