#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[200], y[200];
pair<int, int> z[1000];
bool BNS(int a, int b) {
  int left = 0, right = n, mid;
  while (true) {
    if (left >= right - 1) break;
    mid = (left + right) / 2;
    if (z[mid].first == a && z[mid].second == b) return 1;
    if (z[mid].first < a || (z[mid].first == a && z[mid].second < b))
      left = mid;
    else
      right = mid;
  }
  return 0;
}
int main() {
  while (true) {
    cin >> m;
    if (!m) break;
    cin >> x[0] >> y[0];
    for (int i = 1; i < m; i++) {
      cin >> x[i] >> y[i];
      x[i] -= x[0], y[i] -= y[0];
    }
    cin >> n;
    for (int i = 0; i < n; i++) cin >> z[i].first >> z[i].second;
    sort(z, z + n);
    for (int i = 0; i < n; i++) {
      bool ok = true;
      for (int j = 1; j < m; j++)
        if (!BNS(z[i].first + x[j], z[i].second + y[j])) ok = false;
      if (ok) cout << z[i].first - x[0] << " " << z[i].second - y[0] << endl;
    }
  }
  return 0;
}
