#include <bits/stdc++.h>
using namespace std;
int main() {
  int nx[200];
  int ny[200];
  int mx[200];
  int my[200];
  while (1) {
    int n;
    scanf("%d", &n);
    if (n == 0) {
      break;
    }
    for (int i = 0; i < n; i++) {
      scanf("%d%d", &nx[i], &ny[i]);
    }
    int m;
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &mx[i], &my[i]);
    }
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < m; j++) {
        int temp;
        if (mx[i] < mx[j]) {
          temp = mx[i];
          mx[i] = mx[j];
          mx[j] = temp;
          temp = my[i];
          my[i] = my[j];
          my[j] = temp;
        }
      }
    }
    for (int i = 0; i < m; i++) {
      int dx = mx[i] - nx[0];
      int dy = my[i] - ny[0];
      int flgg = 1;
      for (int j = 0; j < n; j++) {
        int flg = 0;
        for (int k = 0; k < m; k++) {
          if (nx[j] + dx == mx[k] && ny[j] + dy == my[k]) {
            flg = 1;
            break;
          }
        }
        if (flg == 0) {
          flgg = 0;
          break;
        }
      }
      if (flgg == 1) {
        printf("%d %d\n", dx, dy);
        break;
      }
    }
  }
}
