## main

loop do
  m = gets.strip.to_i
  break if m == 0

  cnstl = []
  m.times do
    x, y = gets.strip.split(' ').map{|s| s.to_i}
    cnstl << [x, y]
  end

  cnstl.sort!{|a, b| (cmp = a[1] <=> b[1]) != 0 ? cmp : a[0] <=> b[0]}

  corg = cnstl[0]
  cox, coy = corg
  for i in (1...m)
    x1, y1 = cnstl[i]
    cnstl[i] = [x1 - cox, y1 - coy]
  end
  #p cnstl

  n = gets.strip.to_i

  stars = []
  exists = {}

  n.times do
    x, y = gets.strip.split(' ').map{|s| s.to_i}
    stars << [x, y]
    exists[[x,y]] = true
  end
  #p stars
  #p exists

  for st in stars
    x0, y0 = st
    found = true

    for i in (1...m)
      dx, dy = cnstl[i]
      if exists[[x0 + dx, y0 + dy]].nil?
        found = false
        break
      end
    end

    if found
      puts [x0 - cox, y0 - coy].join(' ')
      break
    end
  end
end