import Control.Applicative ((<$>)) main :: IO () main = solve <$> map read <$> words <$> getLine >>= putStrLn solve :: [Int] -> String solve [x1, y1, x2, y2, x3, y3] = maybe "-1" f . foldr g Nothing $ [((x1, y1),(x2, y2), (x3, y3)), ((x2, y2), (x3, y3), (x1, y1)), ((x3, y3), (x1, y1), (x2, y2))] where f (x4, y4) = show x4 ++ " " ++ show y4 g ((x1, y1), (x2, y2), (x3, y3)) m | xa * xb + ya * yb == 0 && xa^2 + ya^2 == xb^2 + yb^2 = Just (x1+xa+xb, y1+ya+yb) | otherwise = m where xa = x2 - x1 ya = y2 - y1 xb = x3 - x1 yb = y3 - y1