#include <cstdio>
using namespace std;

int main(){

while(1){

  int m,n,s[203][2] = {0};
  scanf("%d",&m);
  
  if(m == 0) break;

  int kx,ky,da[1003][2]={0};

  scanf("%d%d",&kx,&ky);

  for(int i = 0;i < m-1;i++){
    int tx,ty;
    scanf("%d%d",&tx,&ty);
    s[i][0] = tx - kx;
    s[i][1] = ty - ky;
  }
  scanf("%d",&n);

  for(int i = 0;i < n;i++){
    int t1,t2;
    scanf("%d%d",&t1,&t2);
    da[i][0] = t1;
    da[i][1] = t2;
  }

  int ax,ay;

  for(int i = 0;i < n;i++){
    ax = da[i][0];
    ay = da[i][1];
    for(int j = 0;j < m-1;j++){
      int cx = ax + s[j][0];
      int cy = ay + s[j][1];
      if(cx < 0 || cy < 0 ){
	goto out;
      }
	  for(int k = 0;k < n;k++){
		if(da[k][0] == cx && da[k][1] == cy){
			goto hev;
		}
	  }
	  goto out;
	  hev:
	  ;
	}
    break;
  out:
    ;
  }

  printf("%d %d\n",ax-kx,ay-ky);
  
  }

  return 0;
}
