#include<iostream>
#include<cstring>
#include<vector>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;
typedef long long int ll;

int main(){
	int n,m;
	while(cin >> n && n){
		P star1[210];
		P star2[1010];
		for(int i=0;i<n;i++){
			cin >> star1[i].first >> star1[i].second;
		}
		cin >> m;
		for(int i=0;i<m;i++){
			cin >> star2[i].first >> star2[i].second;
		}
		int mx=star1[0].first;
		int my=star1[0].second;
		for(int i=0;i<m;i++){
			int hx = star2[i].first - mx;
			int hy = star2[i].second - my;
			int cou = 0;
			for(int j=1;j<n;j++){
				int tx = star1[j].first + hx;
				int ty = star1[j].second + hy;
				for(int k=0;k<m;k++){
					int gx = star2[k].first;
					int gy = star2[k].second;
					if(gx == tx && gy == ty){
						cou++;
						break;
					}
				}
				if(cou != j) break;
			}
			if(cou == n-1){
				cout << hx << " " << hy << endl;
				break;
			}
		}
	}
}