#include <stdio.h>
 
#define M_MAX 201
#define N_MAX 1001
 
int n, m;
int mx[M_MAX], my[M_MAX];
int nx[N_MAX], ny[N_MAX];
 
int main() {
  int i, j;
  int k;
   
  while (scanf("%d", &m),m) {
    for (i = 0; i < m; i++) {
      scanf("%d%d", mx+i, my+i);
    }
     
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
      scanf("%d%d", nx+i, ny+i);
    }
     
    for (i = 0; i < n; i++) {
      for (j = 1; j < m; j++) {
    int xd = nx[i] - mx[0] + mx[j];
    int yd = ny[i] - my[0] + my[j];
     
    for (k = 0; k < n; k++) {
      if (xd == nx[k] && yd == ny[k]) {
        break;
      }
    }
     
    if (k == n) {
      break;
    }
      }
      if (j == m) {
    printf("%d %d\n", nx[i] - mx[0], ny[i] - my[0]);
    break;
      }
    }
  }
   
  return 0;
}