#include<iostream>
#include<vector>
#include<utility>
#include<map>
using namespace std;
int main(){
    int m;
    while(cin >> m, m){
        int a,b;
        cin >> a >> b;
        vector<int> tx(m-1),ty(m-1);
        for(int i = 0; i < m-1; i++){
            int p,q;
            cin >> p >> q;
            tx[i] = p-a;
            ty[i] = q-b;
        }
        int n;
        cin >> n;
        vector<int> x(n),y(n);
        map<pair<int,int>,int> ma;
        for(int i = 0; i < n; i++){
            cin >> x[i] >> y[i];
            ma[make_pair(x[i],y[i])]++;
        }
        for(int i = 0; i < n; i++){
            bool c = true;
            for(int j = 0; j < m-1 && c; j++){
                if(ma.count(make_pair(x[i]+tx[j],y[i]+ty[j])) == 0){
                    c = false;
                }
            }
            if(c){
                cout << x[i] - a << " " << y[i] - b << endl;
                break;
            }
        }
    }
}

