#include<cstdio>
#include<algorithm>
#include<map>
using namespace std;
typedef pair< int , int > Pi;

int main()
{
  int m, n;
  Pi target[200], star[1000];

  while(scanf("%d", &m), m){
    for(int i = 0; i < m; i++){
      scanf("%d %d", &target[i].first, &target[i].second);
    }
    scanf("%d", &n);
    for(int i = 0; i < n; i++){
      scanf("%d %d", &star[i].first, &star[i].second);
    }

    sort( target, target + m);
    sort( star, star + n);

    int shiftx = 0;
    int shifty = 0;

    for(int i = 0; i < n; i++){
      shiftx = star[i].first - target[0].first;
      shifty = star[i].second - target[0].second;

      bool flag = true;
      for(int j = 1; j < m; j++){      
        if(!binary_search( star, star + n, Pi( target[j].first + shiftx, target[j].second + shifty))){
          flag = false;
          break;
        }
      }
      if(flag) break;
    }

    printf("%d %d\n", shiftx, shifty);
  }
  return(0);

}