let to_z x = if x = -0. then 0. else x;;
let read_str () = read_line () |> Str.split (Str.regexp_string ",")
           |> List.map (fun x-> float_of_string x) |> List.nth;;
let () =
  let rec read () =
    try let l = read_str () in
        let x0, y0, x1, y1, xq, yq = l 0, l 1, l 2, l 3, l 4, l 5 in
        let p1_sqr = ( (x1-.x0)**2. +. (y1-.y0)**2. ) and
            in_p = ((x1-.x0)*.(xq-.x0)+.(y1-.y0)*.(yq-.y0)) in
        let x, y = 2.*.in_p*.(x1-.x0)/.p1_sqr +. 2.*.x0 -.xq , 2.*.in_p*.(y1-.y0)/.p1_sqr +. 2.*.y0 -. yq in
        Printf.printf "%f %f\n" (to_z x) (to_z y);read ()
    with End_of_file -> ()
  in
  read ();;