class Yukicoder def initialize x1, y1, x2, y2, x3, y3 = gets.chomp.split.map(&:to_i) -100.upto(100) do |y| -100.upto(100) do |x| d1 = Math.sqrt((y-y1) ** 2 + (x-x1) ** 2) d2 = Math.sqrt((y-y2) ** 2 + (x-x2) ** 2) d3 = Math.sqrt((y-y3) ** 2 + (x-x3) ** 2) min_d = [d1,d2,d3].min if d1+d2+d3 == (2 + Math.sqrt(2)) * min_d puts [x, y].join(' ') return end end end puts -1 end end Yukicoder.new