#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30
#define pb push_back
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	int n, m;
	while(cin >> n && n) {
		vector<P> v(n);
		rep(i, n) cin >> v[i].first >> v[i].second;

		cin >> m;
		vector<P> p(m);
		rep(i, m) cin >> p[i].first >> p[i].second;

		sort(v.begin(), v.end());
		sort(p.begin(), p.end());

		vector<P> d(n);
		rep(i, n) {
			d[i].first = v[i].first - v[0].first;
			d[i].second = v[i].second - v[0].second;
		}

		int a = 0, b = 0;
		rep(i, m) {
			bool flag = true;

			rep(j, n) {
				P t(p[i].first + d[j].first, p[i].second + d[j].second);
				if(binary_search(p.begin(), p.end(), t)) continue;
				flag = false;
			}

			if(flag) {
				a = p[i].first - v[0].first;
				b = p[i].second - v[0].second;
			}
		}

		cout << a << " " << b << endl;
	}

	return 0;
}