#include<bits/stdc++.h>
using namespace std;
struct star{
    int star_x[1000];
    int star_y[1000];
};
int main()
{
    int n,m;
    while(cin>>n,n){
        struct star serch,picture,difference;
        for(int i=0;i<n;i++)cin>>serch.star_x[i]>>serch.star_y[i];
        cin>>m;
        for(int i=0;i<m;i++){
            cin>>picture.star_x[i]>>picture.star_y[i];
            difference.star_x[i]=picture.star_x[i]-serch.star_x[0];
            difference.star_y[i]=picture.star_y[i]-serch.star_y[0];
        }
        for(int i=0;i<m;i++){
            bool now=0;
            for(int j=0;j<n&&!now;j++){
                bool place=0;
                for(int k=0;k<m&&!place;k++)if(difference.star_x[i]==picture.star_x[k]-serch.star_x[j]&&difference.star_y[i]==picture.star_y[k]-serch.star_y[j])place=1;
                if(!place)now=1;
            }
            if(!now)cout<<difference.star_x[i]<<" "<<difference.star_y[i]<<endl;
        }
    }
}