#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int m, n;
vector<pair<int, int> > Ws;
vector<pair<int, int> > Map;
bool f = false;
void solve(int index_s, int index_m, int x, int y) {
  if (index_s == m) {
    printf("%d %d\n", x, y);
    f = true;
    return;
  }
  if (index_m == n) return;
  if (Map[index_m].first - Ws[index_s].first == x &&
      Map[index_m].second - Ws[index_s].second == y)
    solve(index_s + 1, index_m + 1, x, y);
  else
    solve(index_s, index_m + 1, x, y);
  return;
}
int main() {
  while (scanf("%d", &m), m) {
    Ws.clear();
    Map.clear();
    for (int i = 0; i < m; i++) {
      pair<int, int> p;
      scanf("%d%d", &p.first, &p.second);
      Ws.push_back(p);
    }
    stable_sort(Ws.begin(), Ws.end());
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      pair<int, int> p;
      scanf("%d%d", &p.first, &p.second);
      Map.push_back(p);
    }
    stable_sort(Map.begin(), Map.end());
    for (int i = 0; i < n - 1; i++) {
      solve(1, i + 1, Map[i].first - Ws[0].first, Map[i].second - Ws[0].second);
      if (f) break;
    }
  }
  return 0;
}
