#include<iostream>
#include<vector>
#include<set>
using namespace std;

int main(){
    int m,n;
    while(cin>>m,m){
        set<pair<int,int> >s2;
        vector<pair<int,int> >v1;
        vector<pair<int,int> >v2;
        for(int i=0;i<m;i++){
            int a,b;
            cin>>a>>b;
            v1.push_back(make_pair(a, b));
        }
        cin>>n;
        for(int i=0;i<n;i++){
            int a,b;
            cin>>a>>b;
            s2.insert(make_pair(a, b));
            v2.push_back(make_pair(a, b));
        }
        for(int i=0;i<n;i++){
            int dx=v2[i].first-v1[0].first;
            int dy=v2[i].second-v1[0].second;
            int found=true;
            for(int j=1;j<m;j++){
                int tx=v1[j].first+dx;
                int ty=v1[j].second+dy;
                if(!s2.count(make_pair(tx,ty))){
                    found=false;
                    break;
                }
            }
            if(found){
                cout<<dx<<" "<<dy<<endl;
                break;
            }
        }
    }
}