#include<iostream>

using namespace std;

struct Point{
  int x;
  int y;
};

const int MAX_M = 201;
const int MAX_N = 1001;

Point wanted[MAX_M];
Point input[MAX_N];
int m,n;


bool find(int px, int py){

  for(int i = 0; i < n; i++)
    if(input[i].x == px && input[i].y == py) return true;

  return false;
}

bool isStar(Point base){
  for(int i = 1; i < m; i++)
    if(!find(base.x+wanted[i].x-wanted[0].x,base.y+wanted[i].y-wanted[0].y)) return false;

  return true;
}

void solve(){
  Point ans;
  
  for(int i = 0; i < n; i++)
    if(isStar(input[i])) ans = input[i];

  cout << ans.x-wanted[0].x << " " << ans.y-wanted[0].y << endl;
}

int main(){
  while(cin >> m && m){
    
    for(int i = 0; i < m; i++)
      cin >> wanted[i].x >> wanted[i].y;
    
    cin >> n;
    for(int i = 0; i < n; i++)
      cin >> input[i].x >> input[i].y;
    
    solve();
  }
  return 0;
}