#include<iostream>
#include<map>
#include<algorithm>
using namespace std;

typedef pair<int, int> P;

#define F first
#define S second

int main(void)
{
  int m, n, x, y;
  P target[256], star[1024];
  P shift[1024];

  while(cin >> m, m){
    for(int i = 0;i < m; i++)
      cin >> target[i].F >> target[i].S;
    cin >> n;
    for(int i = 0;i < n; i++)
      cin >> star[i].F >> star[i].S;
    
    sort(target, target + m);
    sort(star, star + n);
    
    bool flag;
    for(int i = 0;i < n; i++){
      flag = true;
      x = star[i].F - target[0].F;
      y = star[i].S - target[0].S;

      for(int j = 0;j < m; j++){
	if(!binary_search(star, star + n, P(target[j].F + x, target[j].S + y))){
	  flag = false;
	  break;
	}	
      }
      if(flag) break;
    }
    cout << x << " " << y << endl;
  }
}
