
//aoj 0524 Searching Constellation

#include<iostream>

using namespace std;

int main(){
	while (1){
		int n, m, x, y, roop = 0, a[200][2]={}, b[1000][2]={}, star[1000000][2]={},starx[1000000] = {}, stary[1000000] = {}, starx2[1000000] = {}, stary2[1000000] = {};;

		cin >> n;
		
		if (n == 0){
			return 0;
		}

		for (int i = 0; i < n; i++){

			cin >> x >> y;

			starx[x] = 1;

			stary[y] = 1;

			a[i][0] = x;

			a[i][1] = y;

		}

		for (int i = 0; i < n - 1; i++){

			star[i][0] = a[i + 1][0] - a[0][0];

			star[i][1] = a[i + 1][1] - a[0][1];

		}

		cin >> m;

		for (int i = 0; i < m; i++){

			cin >> x >> y;

			starx2[x] = 1;

			stary2[y] = 1;

			b[i][0] = x;

			b[i][1] = y;

		}
		for (int i = 0; i < n; i++){

			for (int j = 0; j < n; j++){

				if (starx2[b[i][0] + star[j][0]] == 1 && stary2[b[i][1] + star[j][1]] == 1){

					roop++;

					if (n == roop){

						cout << b[i][0] - a[0][0] << ' ' << b[i][1] - a[0][1] << endl;

					}

				}
				else{

					roop = 0;

				}

			}

		}
	
	}
	return 0;

}


//aoj 0524 Searching Constellation

#include<iostream>

using namespace std;

int starx[1000000] = {}, stary[1000000] = {}, starx2[1000000] = {}, stary2[1000000] = {};

int main(){
	while (1){
		int n, m, x, y, roop = 0, a[20000][2]={}, b[100000][2]={}, star[10000000][2]={};

		cin >> n;
		
		if (n == 0){
			return 0;
		}

		for (int i = 0; i < n; i++){

			cin >> x >> y;

			starx[x] = 1;

			stary[y] = 1;

			a[i][0] = x;

			a[i][1] = y;

		}

		for (int i = 0; i < n - 1; i++){

			star[i][0] = a[i + 1][0] - a[0][0];

			star[i][1] = a[i + 1][1] - a[0][1];

		}

		cin >> m;

		for (int i = 0; i < m; i++){

			cin >> x >> y;

			starx2[x] = 1;

			stary2[y] = 1;

			b[i][0] = x;

			b[i][1] = y;

		}
		for (int i = 0; i < n; i++){

			for (int j = 0; j < n; j++){

				if (starx2[b[i][0] + star[j][0]] == 1 && stary2[b[i][1] + star[j][1]] == 1){

					roop++;

					if (n == roop){

						cout << b[i][0] - a[0][0] << ' ' << b[i][1] - a[0][1] << endl;

					}

				}
				else{

					roop = 0;

				}

			}

		}
	
	}
	return 0;

}