#include<stdio.h>
#include<mpi.h>
#include<stdlib.h>

int main(int argc, char *argv[])
{

  int nmax, rank, np, *p, *data, *result;
  int start, end, tag = 0;
  double t0, t1;
  MPI_Request req0, req1;
  MPI_Status stat;

  int m,n,i,j,temp,x1[205],y1[205],x2[1010],y2[1010],count,sum,k;
  int difx,dify,range;

  MPI_Init(&argc, &argv);
  MPI_Comm_size(MPI_COMM_WORLD, &np);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);

  while(1){

    if(rank == 0){
      
      scanf("%d",&m);
      
    }
    
    MPI_Bcast(&m, 1, MPI_INT, 0, MPI_COMM_WORLD);
     

    if(!m) break;
      
    if(rank == 0){
      
      for(i = 0; i < m; i++){
	scanf("%d %d",&x1[i],&y1[i]);
      }
      
      for(i = 0; i < m-1; i++){
	for(j = m-1; j > i; j--){
	  if(x1[j] < x1[j-1] || (x1[j] == x1[j-1] && y1[j] < y1[j-1])){
	    temp = x1[j];
	    x1[j] = x1[j-1];
	    x1[j-1] = temp;
	    temp = y1[j];
	    y1[j] = y1[j-1];
	    y1[j-1] = temp;
	  }
	}
      }
      
      scanf("%d",&n);

    }
      
    MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD);
    
    if(rank == 0){
      
      for(i = 0; i < n; i++){
	scanf("%d %d",&x2[i],&y2[i]);
      }
      
      
      for(i = 0; i < n-1; i++){
	for(j = n-1; j > i; j--){
	  if(x2[j] < x2[j-1] || (x2[j] == x2[j-1] && y2[j] < y2[j-1])){
	    temp = x2[j];
	    x2[j] = x2[j-1];
	    x2[j-1] = temp;
	    temp = y2[j];
	    y2[j] = y2[j-1];
	    y2[j-1] = temp;
	  }
	}
      }

    }

    MPI_Bcast(x1, m, MPI_INT, 0, MPI_COMM_WORLD);
    MPI_Bcast(y1, m, MPI_INT, 0, MPI_COMM_WORLD);
    MPI_Bcast(x2, n, MPI_INT, 0, MPI_COMM_WORLD);
    MPI_Bcast(y2, n, MPI_INT, 0, MPI_COMM_WORLD);
   

    start = m/np * rank;
    end = start + m/np;
    if(rank == np-1) end += m%np;    


    for(i = 0; i < n-m; i++){
      difx = x2[i]-x1[0];
      dify = y2[i]-y1[0];
 
      count = 0;	
      
      for(j = start; j < end; j++){
	for(k = i+1; k < n; k++){
	  if(x1[j] + difx == x2[k] && y1[j] + dify == y2[k]) count++;
	}
      }         


      MPI_Reduce(&count, &sum, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
      
      MPI_Bcast(&sum, 1, MPI_INT, 0, MPI_COMM_WORLD);

      if(sum+1 == m) break;
      
    }
    
    if(rank == 0) printf("%d %d\n",difx,dify);
    
  }

  MPI_Finalize();
  
  return 0;
  
}