loop do
  # 入力
  m = gets.to_i
  break if m == 0
  seiza_x,seiza_y = [],[]
  m.times {|i| seiza_x[i], seiza_y[i] = gets.split(" ").map(&:to_i)}
  n = gets.to_i
  sky = {}
  n.times {sky[ gets.split(" ").map(&:to_i) ] = true}

  # 星座の最初の星の座標を原点に合わせる
  dx,dy = seiza_x[0] ,seiza_y[0]
  m.times {|i| seiza_x[i] -= dx; seiza_y[i] -= dy}

  # main
  res_x, res_y = nil, nil
  sky.each_key do |star|
    x,y = star[0], star[1]
    m.times do |i|
      break unless sky.has_key?([x+seiza_x[i], y+seiza_y[i]])
      res_x,res_y = x-dx, y-dy if i == m-1
    end
    break unless res_x.nil?
  end

  puts "#{res_x} #{res_y}"
end