#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};
int m;
int n;
vector<pair<int, int> > seiza;
vector<pair<int, int> > board;
int main() {
  while (cin >> m, m) {
    int x, y;
    seiza.clear();
    board.clear();
    for (int i = 0; i < m; i++) {
      cin >> x >> y;
      seiza.push_back(pair<int, int>(x, y));
    }
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      board.push_back(pair<int, int>(x, y));
    }
    map<pair<int, int>, int> Map;
    for (int i = 0; i < board.size(); i++) {
      for (int j = 0; j < board.size(); j++) {
        int dx = board[i].first - seiza[j].first;
        int dy = board[i].second - seiza[j].second;
        Map[pair<int, int>(dx, dy)]++;
      }
    }
    for (map<pair<int, int>, int>::iterator it = Map.begin(); it != Map.end();
         it++) {
      if (it->second == seiza.size()) {
        x = it->first.first;
        y = it->first.second;
        break;
      }
    }
    cout << x << " " << y << endl;
  }
  return 0;
}
