#include <iostream>
#include <vector>

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

void solve()
{
	int m;
	while(cin >> m, m)
	{
		vector<P> before(m);
		for(int i = 0; i < m; ++i)
		{
			cin >> before[i].first >> before[i].second;
		}
		int n;
		cin >> n;
		vector<P> after(n);
		for(int i = 0; i < n; ++i)
		{
			cin >> after[i].first >> after[i].second;
		}
		for(int i = 0; i < n; ++i)
		{
			bool flag = true;
			int dx = after[i].first - before[0].first;
			int dy = after[i].second - before[0].second;
			for(int j = 0; j < m; ++j)
			{
				int x = before[j].first + dx;
				int y = before[j].second + dy;
				bool exist_flag = false;
				for(int k = 0; k < n; ++k)
				{
					if(after[k].first == x && after[k].second == y)
					{
						exist_flag = true;
						break;
					}
				}
				if(!exist_flag)
				{
					flag = false;
					break;
				}
			}
			if(flag)
			{
				cout << dx << " " << dy << endl;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}