#include<iostream>
#include<algorithm>
#include<map>

#define x first
#define y second

using namespace std;
typedef pair<int, int> P;
P hosi[220];
P hosi2[1010];
P shift;
bool flag;
int main(){
  int m, n;
  while(1){
    cin >> m;
    if(!m) break;
    for(int i = 0; i < m; i++){
      cin >> hosi[i].x >> hosi[i].y;
    }
    
    cin >> n;
    for(int i = 0; i < n; i++){
      cin >> hosi2[i].x >> hosi2[i].y;
    }
    
    sort(hosi, hosi + m);
    sort(hosi2, hosi2 + n);
    
    for(int i = 0; i < n; i++){
      flag = true;
      shift.x = hosi2[i].x - hosi[0].x;
      shift.y = hosi2[i].y - hosi[0].y;
      for(int j = 0; j < m; j++){
	if(!binary_search(hosi2, hosi2 + n, P(hosi[j].x + shift.x, hosi[j].y + shift.y))){
	  flag = false;
	  break;
	}
      }
      if(flag == true) break;
    }
    cout << shift.x << " " << shift.y << endl;
  }
}