#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define MOD 1000000007
#define ALL(a) (a).begin(),(a).end()
#define ms(m,v) memset(m,v,sizeof(m))
#define D10  fixed<<setprecision(10) 
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> P;
typedef long long ll;
struct edge{ int from, to, cost; };

string s;

int main()
{
	vector<P> m; vector<P> n;
	int N, M;
	while (cin >> M, M)
	{
		m.clear(); n.clear();
		int x, y;
		REP(i, M)
		{
			cin >> x >> y;
			m.push_back(P(x, y));
		}
		sort(ALL(m));
		cin >> N;
		REP(i, N)
		{
			cin >> x >> y;
			n.push_back(P(x, y));
		}
		sort(ALL(n));
		REP(i, 300) n.push_back(P(INF, INF));
		REP(i, N)
		{
			int dx, dy;
			dx = n[i].first - m[0].first; dy = n[i].second - m[0].second;

			REP(j, M)
			{
				FOR(k, i, N)
				{
					if (m[j].first + dx == n[k].first&&m[j].second + dy == n[k].second)
					{
						goto next;
					}

				}
				goto end;
			next:;
			}
			cout << dx << " " << dy << endl;

		end:;
		}
	}
	return 0;
}