#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
using namespace std;
#define fr first
#define sc second
typedef pair<int,int> P;
int main(){
  int m,n;

  while( cin >> m , m ){
    P p[m];
    for(int i = 0 ; i < m ; i++ ) cin >> p[i].fr >> p[i].sc ;

    cin >> n;
    P set[n];
    for(int i = 0 ; i < n ; i++ ) cin >> set[i].fr >> set[i].sc ;
    sort( set , set + n );

    for(int i = 0 ; i < n ; i++ ) {
      int x = set[i].fr - p[0].fr , y = set[i].sc - p[0].sc ;
      bool judge = true;
      for(int j = 1 ; j < m ; j++ ) {
        if(!binary_search(set,set+n,P(p[j].fr + x,p[j].sc + y))) judge = false;
      }
      if(judge){
        cout << x << " " << y << endl;
        break;
      }
    }
  }
}