#include<iostream>
using namespace std;
 
struct location{
    int x;
    int y;
};
 
bool solve2(int m, int n, location sample[], location star[], int start)
{
    int star_now = start;
    for (int i = 1; i < m - 1; i++){
        location vec_sample;
        vec_sample.x = sample[i + 1].x - sample[i].x;
        vec_sample.y = sample[i + 1].y - sample[i].y;
 
        for (int j = 0; j < n; j++){
            location vec_star;
            vec_star.x = star[j].x - star[star_now].x;
            vec_star.y = star[j].y - star[star_now].y;

            if (vec_sample.x == vec_star.x && vec_sample.y == vec_star.y){
                star_now=j;
                break;
            }
        }
 
        if (j == m){ return false; }
    }
    return true;
}
 
void solve1(int m, int n, location sample[], location star[])
{
    location vec_sample;
    vec_sample.x = sample[1].x - sample[0].x;
    vec_sample.y = sample[1].y - sample[0].y;
 
    for (int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            location vec_star;
            vec_star.x = star[j].x - star[i].x;
            vec_star.y = star[j].y - star[i].y;
 
            if (vec_sample.x == vec_star.x && vec_sample.y == vec_star.y){
                bool check = solve2(m, n, sample, star, j);
                if (check){
                    cout << star[i].x - sample[0].x << " " << star[i].y - sample[0].y << endl;
                    return;
                }
            }
        }
    }
}
 
int main()
{
    while (1){
        int m;
        cin >> m;
        if (!m){ break; }
 
        int n;
        location sample[200], star[1000];
        for (int i = 0; i < m; i++){
            cin >> sample[i].x >> sample[i].y;
        }
        cin >> n;
        for (int i = 0; i < n; i++){
            cin >> star[i].x >> star[i].y;
        }
 
        solve1(m, n, sample, star);
 
    }
    return 0;
}