#include <bits/stdc++.h>
using namespace std;
pair<int, int> hosi[100];
pair<int, int> hosi2[100];
pair<int, int> shift;
bool flag;
int main() {
  int m, n;
  while (1) {
    cin >> m;
    if (!m) break;
    for (int i = 0; i < m; i++) {
      cin >> hosi[i].first >> hosi[i].second;
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> hosi2[i].first >> hosi2[i].second;
    }
    sort(hosi, hosi + m);
    sort(hosi2, hosi2 + n);
    for (int i = 0; i < n; i++) {
      flag = true;
      shift.first = hosi2[i].first - hosi[0].first;
      shift.second = hosi2[i].second - hosi[0].second;
      for (int j = 0; j < m; j++) {
        if (!binary_search(hosi2, hosi2 + n,
                           pair<int, int>(hosi[j].first + shift.first,
                                          hosi[j].second + shift.second))) {
          flag = false;
          break;
        }
      }
      if (flag == true) break;
    }
    cout << shift.first << " " << shift.second << endl;
  }
}
