#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
#define x first
#define y second
typedef pair< int , int > Pt;
int main(){
  int m;
  while(cin >> m , m){
    vector< Pt > a(m);
    for(int i = 0 ; i < m ; i++ ) cin >> a[i].x >> a[i].y;
    int n;
    cin >> n;
    vector< Pt > all(n);
    for(int i = 0 ; i < n ; i++ ) cin >> all[i].x >> all[i].y;
    sort(a.begin(),a.end());
    sort(all.begin(),all.end());
    for(int i = 0 ; i < n ; i++ ){
      int xx = all[i].x - a[0].x, yy = all[i].y - a[0].y, j;
      for(j = 0 ; j < m ; j++ ){
        if(!binary_search(all.begin(),all.end(),Pt(a[j].x+xx,a[j].y+yy))){
          break;
        }
      }
      if(j == m){
        cout << all[i].x - a[0].x << " "  << all[i].y - a[0].y << endl;
        break;
      }
    }
  }
}