#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;
    while(cin >> n, n != 0){
        vector<pair<int, int> > c, p;

        for(int i=0; i < n; i++){
            int x, y;
            cin >> x >> y;
            c.push_back(make_pair(x, y));
        }
        cin >> n;
        for(int i=0; i < n; i++){
            int x, y;
            cin >> x >> y;
            p.push_back(make_pair(x, y));
        }
        sort(c.begin(), c.end());
        sort(p.begin(), p.end());

        int dx, dy;
        for(int i=0; i < p.size(); i++){
            bool isFind = true;
            dx = p[i].first-c[0].first;
            dy = p[i].second-c[0].second;
            for(int j=1; j < c.size(); j++){
                if(!binary_search( p.begin(), p.end(), make_pair(c[j].first+dx, c[j].second+dy))){ isFind = false; break;}
            }
            if(isFind){ cout << dx << " " << dy << endl;  break;}
        }
    }
}