#include <bits/stdc++.h>
using namespace std;
struct chap {
  int x, y;
};
int main() {
  int n, m;
  while (1) {
    struct chap M[250] = {};
    struct chap N[100001] = {};
    cin >> m;
    if (m == 0) break;
    for (int i = 0; i < m; i++) {
      cin >> M[i].x;
      cin >> M[i].y;
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> N[i].x;
      cin >> N[i].y;
    }
    for (int i = 0; i < m; i++)
      for (int j = m - 1; j > i; j--) {
        if (M[j].x < M[j - 1].x) {
          struct chap T;
          T = M[j - 1];
          M[j - 1] = M[j];
          M[j] = T;
        }
      }
    for (int i = 0; i < n; i++)
      for (int j = n - 1; j > i; j--) {
        if (N[j].x < N[j - 1].x) {
          struct chap TT;
          TT = N[j - 1];
          N[j - 1] = N[j];
          N[j] = TT;
        }
      }
    struct chap ans[203] = {};
    for (int i = 0; i < m; i++) {
      ans[i] = M[i];
    }
    int dx = 0, dy = 0;
    int R = 0;
    bool f = false;
    for (int i = 0; i < n - m + 1; i++) {
      dx = 0, dy = 0;
      dx = N[i].x - M[0].x;
      dy = N[i].y - M[0].y;
      int P = 0;
      for (int j = i; j < n; j++) {
        if (N[j].x - dx == M[P].x && N[j].y - dy == M[P].y && P == m - 1) {
          f = true;
          R = N[j].x;
          break;
        }
        if (N[j].x - dx == M[P].x && N[j].y - dy == M[P].y) {
          P++;
        }
      }
      if (f == true) break;
    }
    cout << dx << " " << dy << endl;
  }
  return 0;
}
