#include <bits/stdc++.h>
using namespace std;
int m, n, conx[200], cony[200], fieldx[1000], fieldy[1000], sconx[200],
    scony[200];
void solve() {
  for (int i = 0; i < n; i++) {
    bool detect;
    for (int j = 0; j < m; j++) {
      sconx[j] = conx[j] + (fieldx[i] - conx[0]);
      scony[j] = cony[j] + (fieldy[i] - cony[0]);
    }
    for (int j = 0; j < m; j++) {
      detect = false;
      for (int k = 0; k < n; k++) {
        if (sconx[j] == fieldx[k] && scony[j] == fieldy[k]) {
          detect = true;
        }
      }
      if (!detect) break;
    }
    if (!detect) continue;
    cout << fieldx[i] - conx[0] << " " << fieldy[i] - cony[0] << endl;
  }
}
int main() {
  while (cin >> m) {
    for (int i = 0; i < m; i++) {
      cin >> conx[i] >> cony[i];
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> fieldx[i] >> fieldy[i];
    }
    solve();
  }
}
