loop do
  m = gets.to_i
  break if m == 0
  pat = []
  minpx = 9999999
  minpy = 9999999
  m.times do
    po = gets.split.map(&:to_i)
    if minpx > po[0]
      minpx = po[0]
      minpy = po[1]
    end
    pat << po
  end
  pat = pat.map { |pos| [ pos[0] - minpx, pos[1] - minpy ] }
  pat.delete [0, 0] # ?????????0, 0???
  n = gets.to_i
  pht = []
  n.times { pht << gets.split.map(&:to_i) }

  pht.each do |(ltx, lty)|
    flag = true
    pat.each do |(dx, dy)|
      flag = false unless pht.find { |pos| pos == [ltx + dx, lty + dy] }
    end

    if flag
      # p [minpx, minpy, ltx, lty].to_s
      puts "#{ltx - minpx} #{lty - minpy}"
      break
    end
  end

end