#include <cstdio>

#pragma warning(disable: 4996)

int m, n, px[200], py[200], sx[1000], sy[1000];

int main()
{
	while (true)
	{
		scanf("%d", &m);

		if (m == 0) { break; }

		for (int i = 0; i < m; i++)
		{
			scanf("%d", &px[i]);
			scanf("%d", &py[i]);
		}

		scanf("%d", &n);

		for (int i = 0; i < n; i++)
		{
			scanf("%d", &sx[i]);
			scanf("%d", &sy[i]);
		}

		for (int i = 0; i < n; i++)
		{
			int fx = sx[i];
			int fy = sy[i];
			int gx = px[0];
			int gy = py[0];
			int hx = fx - gx;
			int hy = fy - gy;

			bool ok[200];

			for (int i = 0; i < m; i++)
			{
				ok[i] = false;
			}

			ok[0] = true;

			for (int j = 1; j < m; j++)
			{
				for (int k = 0; k < n; k++)
				{
					if (px[j] + hx == sx[k] && py[j] + hy == sy[k])
					{
						ok[j] = true;
					}
				}
			}

			for (int i = 0; i < m; i++)
			{
				if (ok[i] == false)
				{
					goto Exit;
				}
			}

			printf("%d %d\n", hx, hy);

		Exit:;
		}
	}

	return 0;
}