require 'matrix' input = gets.split.map(&:to_i) a = [input[0],input[1]] b = [input[2],input[3]] c = [input[4],input[5]] a_b = Vector[b[0]-a[0],b[1]-a[1]] b_c = Vector[c[0]-b[0],c[1]-b[1]] c_a = Vector[a[0]-c[0],a[1]-c[1]] if a_b.inner_product(b_c) == 0 && a_b.r == b_c.r puts "#{c[0]-a_b[0]} #{c[1]-a_b[1]}" return end if b_c.inner_product(c_a) == 0 && b_c.r == c_a.r puts "#{a[0]-b_c[0]} #{a[1]-b_c[1]}" return end if c_a.inner_product(a_b) == 0 && c_a.r == a_b.r puts "#{b[0]-c_a[0]} #{b[1]-c_a[1]}" return end puts (-1)