#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <utility>
using namespace std;
typedef pair<int, int> pii;

int main(){
    while(1){
        int m;
        cin >> m;
        if(m == 0) break;

        vector<pii> a(m);
        for(int i=0; i<m; i++){
            int x,y;
            cin >> x >> y;
            a[i] = pii(x, y);
        }

        int n;
        cin >> n;
        set<pii> b;
        for(int i=0; i<n; i++){
            int x,y;
            cin >> x >> y;
            b.insert(pii(x, y));
        }
        int ansx,ansy;
        for(auto bb: b){
            int dx = bb.first -a[0].first;
            int dy = bb.second -a[0].second;
            bool ok = true;
            for(int i=0; i<m; i++){
                if(b.find(pii(a[i].first+dx, a[i].second+dy)) == b.end()){
                    ok = false;
                    break;
                }
            }
            if(ok){
                ansx = dx;
                ansy = dy;
                break;
            }
        }
        cout << ansx << " " << ansy << endl;
    }
    return 0;
}

