#include <bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0;i < N;i++)
#define F first
#define S second
typedef pair<int,int> Pi;

int main()
{
  int N, M;
  while(cin >> N,N) {
    Pi pps[205];
    Pi star[1005];
    Rep(i,N) {
      cin >> pps[i].F >> pps[i].S;
    }
    cin >> M;
    Rep(i,M) {
      cin >> star[i].F >> star[i].S;
    }
    sort(pps, pps + N);
    sort(star, star + M);
    Rep(p,M) {
      int x = star[p].F - pps[0].F;
      int y = star[p].S - pps[0].S;
      int cnt = 1;
      for(int i = p + 1; i < M && cnt < N; i++) {
	if(star[i].F == pps[cnt].F + x && star[i].S == pps[cnt].S + y)cnt++;
      }
      if(cnt == N) {
	cout << x << " " << y << endl;
	break;
      }
    }
  }
  return 0;
}