#include <iostream>
#include <set>

using namespace std;

int main() {
  for (;;) {
    int m;
    cin >> m;
    if (!m) return 0;
    int xs, ys;
    cin >> xs >> ys;
    pair<int, int> R[200];
    for (int i = 0, xx = xs, yy = ys; i < m-1; i++) {
      int x, y;
      cin >> x >> y;
      R[i].first = x - xx;
      R[i].second = y - yy;
      xx = x;
      yy = y;
    }
    int n;
    cin >> n;
    set<pair<int, int> > S;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      S.insert(make_pair(x, y));
    }
    for (set<pair<int, int> >::iterator s = S.begin(); s != S.end(); ++s) {
      bool f = true;
      for (int i = 0, x = s->first, y = s->second; f && i < m-1; i++) {
        pair<int, int> p(R[i]);
        p.first += x;
        p.second += y;
        if (!S.count(p))
          f = false;
        x = p.first;
        y = p.second;
      }
      if (f) {
        cout << s->first - xs << ' ' << s->second - ys << endl;
        break;
      }
    }
  }
}