#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  pair<int, int> seiza[200], hosi[200];
  while (scanf("%d", &m), m) {
    for (int i = 0; i < m; i++)
      scanf("%d %d", &seiza[i].first, &seiza[i].second);
    scanf("%d", &n);
    for (int i = 0; i < n; i++) scanf("%d %d", &hosi[i].first, &hosi[i].second);
    sort(hosi, hosi + n);
    for (int i = 0; i < n; i++) {
      int x = hosi[i].first - seiza[0].first;
      int y = hosi[i].second - seiza[0].second;
      for (int j = 1; j < m; j++) {
        if (binary_search(
                hosi, hosi + n,
                pair<int, int>(seiza[j].first + x, seiza[j].second + y))) {
          if (j == m - 1) printf("%d %d\n", x, y);
        } else
          break;
      }
    }
  }
  return (0);
}
