#include<stdio.h>
int main()
{
    int n,m,memx,memy,cou;
    while(scanf(("%d"),&n),n)
    {
        int sample[2][300] = {0},str[2][1100] = {0};
        for(int i = 0; i < n; i++)
        {
            scanf("%d%d",&sample[0][i],&sample[1][i]);
        }
        scanf("%d",&m);
        for(int i = 0; i < m; i++)
        {
            scanf("%d%d",&str[0][i],&str[1][i]);
        }
        for(int i = 0; i < m; i++)
        {
            memx = str[0][i] - sample[0][0];
            memy = str[1][i] - sample[1][0];
            cou = 0;
            for(int j = 1; j < n; j++)
            {
                for(int k = 0; k < m; k++)
                {
                    if(sample[0][j] == str[0][k] - memx && sample[1][j] == str[1][k] - memy)
                    {
                        cou++;
                        break;
                    }
                }
            }
            if(cou == n - 1)
            {
                printf("%d %d\n",memx,memy);
                break;
            }
        }
    }
}