#include <bits/stdc++.h>
using namespace std;
int main() {
  int i;
  int m, n, x, y;
  int a[200], b[200];
  map<pair<int, int>, int> c;
  map<pair<int, int>, int>::iterator it;
  while (cin >> m && m) {
    for (i = 0; i < m; i++) cin >> a[i] >> b[i];
    cin >> n;
    c.clear();
    for (i = 0; i < n; i++) {
      cin >> x >> y;
      c[make_pair(x, y)] = 1;
    }
    for (it = c.begin(); it != c.end(); it++) {
      x = (*it).first.first - a[0];
      y = (*it).first.second - b[0];
      for (i = 1; i < m; i++) {
        if (c[make_pair(a[i] + x, b[i] + y)] == 0) break;
      }
      if (i == m) break;
    }
    cout << x << " " << y << endl;
  }
  return 0;
}
