#!/usr/bin/env ruby require "matrix" EPS = 1e-8 def rotation_matrix(angle) c = Math.cos angle s = Math.sin angle m = Matrix[[c, -s, 0], [s, c, 0], [0, 0, 1]] return m end def translation_matrix(delta) m = Matrix[[1, 0, delta[0]], [0, 1, delta[1]], [0, 0, 1]] return m end def rotate_around(center, point, angle) m = translation_matrix(center) m *= rotation_matrix(angle) m *= translation_matrix([-center[0], -center[1]]) v = Vector[*point, 1] a = m * v return Vector[a[0], a[1]] end def find_last_point(point1, point2, point3) ps = [point1, point2, point3] ps.permutation(3) {|p1, p2, p3| q3 = rotate_around(p2, p1, Math::PI / 2.0) return rotate_around(p3, p2, Math::PI / 2.0) if (p3 - q3).r < EPS } return nil end def main() x1, y1, x2, y2, x3, y3 = gets.split.map(&:to_i) point1 = Vector[x1, y1] point2 = Vector[x2, y2] point3 = Vector[x3, y3] ans = find_last_point(point1, point2, point3) if ans != nil puts ans.map(&:round).to_a.join(" ") else puts (-1) end end main