#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > V1, V2;
set<pair<int, int> > S;
bool check(int x) {
  for (int i = 0; i < V1.size(); i++) {
    int nx = V1[i].first - V1[0].first, ny = V1[i].second - V1[0].second;
    if (S.find(pair<int, int>(V2[x].first + nx, V2[x].second + ny)) ==
        S.end()) {
      return false;
    }
  }
  return true;
}
int main() {
  int n, m;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    V1.push_back(pair<int, int>(x, y));
  }
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    V2.push_back(pair<int, int>(x, y));
    S.insert(pair<int, int>(x, y));
  }
  for (int i = 0; i < V2.size(); i++) {
    if (check(i)) {
      printf("%d %d\n", V2[i].first - V1[0].first, V2[i].second - V1[0].second);
      return 0;
    }
  }
}
