#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  while (scanf("%d", &m) && m != 0) {
    vector<pair<int, int> > star(m);
    for (int i = 0; i < m; i++) scanf("%d%d", &star[i].first, &star[i].second);
    scanf("%d", &n);
    vector<pair<int, int> > maps(n);
    vector<vector<pair<int, int> > > diff(n, vector<pair<int, int> >(m));
    for (int i = 0; i < n; i++) scanf("%d%d", &maps[i].first, &maps[i].second);
    int rx, ry;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        diff[i][j].first = maps[i].first - star[j].first;
        diff[i][j].second = maps[i].second - star[j].second;
        vector<pair<int, int> > trans(m);
        for (int k = 0; k < m; k++) {
          trans[k].first = star[k].first + diff[i][j].first;
          trans[k].second = star[k].second + diff[i][j].second;
        }
        bool b = true;
        for (int k = 0; k < m; k++) {
          bool flag = true;
          for (int l = 0; l < n; l++) {
            if (trans[k].first == maps[l].first &&
                trans[k].second == maps[l].second) {
              flag = false;
              break;
            }
          }
          if (flag) {
            b = false;
            break;
          }
        }
        if (b) {
          rx = diff[i][j].first;
          ry = diff[i][j].second;
          break;
        }
      }
    }
    printf("%d %d\n", rx, ry);
  }
}
