#include <bits/stdc++.h>
#define FOR(v, a, b) for(int v = (a); v < (b); ++v)
#define FORE(v, a, b) for(int v = (a); v <= (b); ++v)
#define REP(v, n) FOR(v, 0, n)
#define REPE(v, n) FORE(v, 0, n)
#define RS resize
#define CLR clear
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
using namespace std;

int main(){
	int m, n, x, y;
	vector< complex< int > > c, s;
	
	while(cin >> m, m){
		c.RS(m);
		REP(i, m){
			cin >> x >> y;
			c[i] = complex< int >(x, y);
		}
		
		cin >> n;
		s.RS(n);
		REP(i, n){
			cin >> x >> y;
			s[i] = complex< int >(x, y);
		}
		
		REP(i, n){
			
			complex< int > d = s[i] - c[0];
			bool check = true;
			
			FOR(j, 1, m){
				bool check2 = false;
				REP(k, n){
					if(c[j] + d == s[k]){
						check2 = true;
						break;
					}
				}
				if(!check2){
					check = false;
					break;
				}
			}
			
			if(check){
				cout << d.real() << " " << d.imag() << endl;
				break;
			}
		}
	}
	
	return 0;
}