def get x, y = gets.split.map(&:to_i); Complex(x, y) end m = gets.to_i raise unless m.between?(1, 50000) ps = m.times.map { get } ps.each { |p| x, y = p.rect raise unless x.between?(-10000, +10000) raise unless y.between?(-10000, +10000) } puts "? 0 0" $>.flush org = get puts "? 1 0" $>.flush r = get - org puts "!" ps.map { |c| c*r + org }.each { |c| x, y = c.rect puts "#{x} #{y}" } $>.flush