#include<cstdio>
#include<map>
#include<set>
using namespace std;
int main()
{
	int m,n,i,x,y,lx,ly;
	typedef pair<int,int>P;
	P a[200];
	while(scanf("%d",&m),m)
	{
		set<P>s;
		for(lx=ly=i=0;i<m;++i)
		{
			scanf("%d%d",&x,&y);
			a[i].first=x-lx,a[i].second=y-ly;
			lx=x,ly=y;
		}
		scanf("%d",&n);
		for(i=0;i<n;++i)
		{
			scanf("%d%d",&x,&y);
			s.insert(P(x,y));
		}
		for(set<P>::iterator z=s.begin();z!=s.end();++z)
		{
			P p(*z);
			for(i=1;i<m;++i)
			{
				p.first+=a[i].first;
				p.second+=a[i].second;
				if(s.find(p)==s.end()) goto NEXT;
			}
			printf("%d %d\n", z->first-a[0].first,z->second-a[0].second);
			break;
		NEXT:
			;
		}
	}
	return 0;
}