import Data.Complex
import Control.Applicative
import Data.List.Split
import Text.Printf
main = do
  v <- map (map read . splitOn ",") . lines <$> getContents
  mapM_ ((\x->putStrLn $ printf "%.5f" (fst x) ++ " " ++ printf "%.5f" (snd x)) . solve ) v

solve :: [Double] -> (Double,Double)
solve (x1:y1:x2:y2:xq:yq:_)
  | x1==x2 = (2*x1-xq, yq)       -- parallel to y axis
  | otherwise = (realPart zq,imagPart zq)   
  where
    m = (y2-y1)/(x2-x1)          -- y = mx + n 
    n = (x2*y1-x1*y2)/(x2-x1)
    d = abs(yq - m*xq - n) / sqrt(1+m^2) -- distant from Q to P1-p2
    zv = m :+ (-1)               -- vector perpendicular to P1-P2
    ze = zv / (magnitude zv :+ 0) -- make it a unit one
    zq = (xq :+ yq) + 2*ze*(d :+ 0) -- twice the distant from Q