#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int m, n;
int xm[210], ym[210], xn[1010], ynn[1010], x, y;
typedef pair<int, int> P;
typedef map<P, int> mp;
int main(){
  while(1){
    mp p;
    cin >> m;
    if(m == 0) break;
    for(int i = 0; i < m; i++){
      cin >> xm[i] >> ym[i];
    }
    cin >> n;
    for(int i = 0; i < n; i++){
      cin >> xn[i] >> ynn[i];
    }
    for(int i = 0; i < m; i++){
      for(int j = 0; j < n; j++){
	p[P(xn[j] - xm[i], ynn[j] - ym[i])]++;
	x = xn[j] - xm[i];
	y = ynn[j] - ym[i];
	if(p[P(xn[j] - xm[i], ynn[j] - ym[i])] == m) break;
      }
    }
    cout << x << " " << y << endl;
  }
}