#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    pair<int, int> origin;
    --n;
    cin >> origin.first >> origin.second;
    vector<pair<int, int> > type;
    for (long long i = 0; i < n; ++i) {
      int a, b;
      cin >> a >> b;
      pair<int, int> temp(a - origin.first, b - origin.second);
      type.push_back(temp);
    }
    cin >> n;
    set<pair<int, int> > judge;
    vector<pair<int, int> > point;
    for (long long i = 0; i < n; ++i) {
      int a, b;
      cin >> a >> b;
      point.emplace_back(a, b);
      judge.emplace(a, b);
    }
    for (long long i = 0; i < point.size(); ++i) {
      bool f(true);
      for (long long j = 0; j < type.size(); ++j) {
        pair<int, int> p(point[i].first + type[j].first,
                         point[i].second + type[j].second);
        f &= judge.find(p) != judge.end();
      }
      if (f) {
        cout << point[i].first - origin.first << " "
             << point[i].second - origin.second << endl;
        break;
      }
    }
  }
  return 0;
}
