#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
    while(true) {
        int m;
        cin>>m;
        if(m==0)break;
        vector<pair<int,int>> s;
        for(int i = 0;i < m;++i) {
            int x,y;
            cin>>x>>y;
            s.emplace_back(y,x);
        }
        int n;
        cin>>n;
        vector<pair<int,int>> p;
        set<pair<int,int>> ps;
        for(int i = 0;i < n;++i) {
            int x,y;
            cin>>x>>y;
            p.emplace_back(y,x);
            ps.insert(p[i]);
        }
        int sy=s[0].first,sx=s[0].second;
        int yo,xo;
        bool ok;
        for(int i = 0;i < n;++i) {
            yo=sy-p[i].first;
            xo=sx-p[i].second;
            ok=true;
            for(int j = 0;j < m;++j) {
                if(ps.find(make_pair(s[j].first-yo,s[j].second-xo))==ps.end()) {
                    ok=false;
                    break;
                }
            }
            if(ok) {
                cout<<-xo<<" "<<-yo<<endl;
                break;
            }
        }
    }
    return 0;
}

