using System.Collections.Generic;
using System.Linq;
using System;

public class Star
{
    public long sx { get; set; }
    public long sy { get; set; }
}
public class hello
{
    public static void Main()
    {
        while (true)
        {
            var conste = new List<Star>();
            var photo = new List<Star>();
            var n = int.Parse(Console.ReadLine().Trim());
            if (n == 0) break;
            string[] s = Console.ReadLine().Trim().Split(' ');
            var cx1 = int.Parse(s[0]);
            var cy1 = int.Parse(s[1]);
            for (int i = 1; i < n; i++)
            {
                string[] line = Console.ReadLine().Trim().Split(' ');
                conste.Add(new Star { sx = int.Parse(line[0]), sy = int.Parse(line[1]) });
            }
            var m = int.Parse(Console.ReadLine().Trim());
            for (int i = 0; i < m; i++)
            {
                string[] line = Console.ReadLine().Trim().Split(' ');
                photo.Add(new Star { sx = int.Parse(line[0]), sy = int.Parse(line[1]) });
            }
            for (int i = 0; i < m; i++)
            {
                var dx = photo[i].sx - cx1;
                var dy = photo[i].sy - cy1;
                if ( CheckPhoto(conste, photo, dx, dy))
                {
                    Console.WriteLine("{0} {1}", dx, dy);
                    break;
                }
            }
        }
    }
    public static bool  CheckPhoto (List<Star> c , List<Star>  p ,long dx  ,long dy)
    {
        foreach (var x in c)
        {
            var find = 0;
            for (int i = 0; i < p.Count() - 1; i++)
                if (x.sx + dx == p[i].sx && x.sy + dy == p[i].sy) find = 1;
            if (find == 0) return false;
        }
        return true;
    }
}