#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  int n;
  int c;
  int f;
  int g;
  int h;
  int i;
  int j;
  int k;
  while (cin >> m) {
    if (m == 0) {
      break;
    }
    int a[m];
    int b[m];
    c = 0;
    while (c < m) {
      cin >> a[c];
      cin >> b[c];
      c = c + 1;
    }
    cin >> n;
    int d[n];
    int e[n];
    c = 0;
    while (c < n) {
      cin >> d[c];
      cin >> e[c];
      c = c + 1;
    }
    c = 0;
    while (c < n) {
      k = 0;
      f = d[c] - a[0];
      g = e[c] - b[0];
      h = 1;
      while (h < m) {
        j = 0;
        i = 0;
        while (i < n) {
          if (a[h] + f == d[i] && b[h] + g == e[i]) {
            j = 1;
            break;
          }
          i = i + 1;
        }
        if (j == 0) {
          k = 1;
          break;
        }
        h = h + 1;
      }
      if (k == 0) {
        cout << g << " " << h << endl;
        break;
      }
      c = c + 1;
    }
  }
}
