#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > s(201), d(1001);
int main() {
  int m, n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> s[i].first >> s[i].second;
  cin >> m;
  for (int i = 0; i < m; ++i) cin >> d[i].first >> d[i].second;
  sort(s.begin(), s.begin() + n);
  sort(d.begin(), d.begin() + m);
  for (int i = 0; i < m; ++i) {
    int dx = d[i].first - s[0].first;
    int dy = d[i].second - s[0].second;
    bool ok = true;
    for (int j = 1; j < n; ++j) {
      if (find(d.begin() + i + 1, d.begin() + n,
               make_pair(d[j].first + dx, d[j].second + dy)) == d.end()) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << dx << " " << dy << endl;
      break;
    }
  }
  return 0;
}
