#include <iostream>
#include <vector>
#include <utility>
using namespace std;

typedef pair <int,int> PII;
typedef vector <PII> VPII;

int main( void )
{
	int m, n;
	while ( cin >> m && m )
	{
		int x, y;

		VPII search( m );
		for ( int i = 0; i < m; i++ )
		{
			cin >> x >> y;
			search[i] = make_pair( x, y );
		}
		cin >> n;
		VPII field( n );
		for ( int i = 0; i < n; i++ )
		{
			cin >> x >> y;
			field[i] = make_pair( x, y );
		}

		VPII d( m );
		for ( int i = 1; i < m; i++ )
		{
			d[i].first = search[i].first - search[0].first;
			d[i].second = search[i].second - search[0].second;
		}

		for ( int i = 0; i < n; i++ )
		{
			bool found = true;
			for ( int j = 1; found && j < m; j++ )
			{
				PII q = field[i];
				q.first += d[j].first;
				q.second += d[j].second;
				bool not_found = true;
				for ( int k = 0; k < n; k++ )
				{
					if ( field[k] == q ) not_found = false;
				}
				if ( not_found ) found = false;
			}
			if ( found )
			{
				cout << field[i].first - search[0].first << " " << field[i].second - search[0].second << endl;
				break;
			}
		}
	}
	return 0;
}