#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

#define f first
#define s second

typedef pair<int, int> P;

int main(){
  int m, n;
  P search[210], star[1010];
  while(cin >> m, m){
    for(int i = 0 ; i < m ; i++) cin >> search[i].f >> search[i].s;
    cin >> n;
    for(int i = 0 ; i < n ; i++) cin >> star[i].f >> star[i].s;
    int x, y;
    for(int i = 0 ; i < n ; i++){
      x = star[i].f - search[0].f;
      y = star[i].s - search[0].s;
      int cnt = 0;
      
      for(int j = 0 ; j < m ; j++){
	for(int k = 0 ; k < n ; k++){
	  if(search[j].f + x == star[k].f && search[j].s + y == star[k].s) cnt++;
	}
      }
      if(cnt == m) break;
    }
    cout << x << ' ' << y << endl;
  }
  return 0;
}