let read_lines () =
  let rec iter xs =
    try read_line() :: xs |> iter
    with End_of_file -> xs
  in iter [] |> List.rev

let split_nums str =
  Str.split (Str.regexp " ") str
  |> List.map float_of_string

let solve_se = function
    | [a; b; c; d; e; f] ->
       let x = (e*.c -. b*.f) /. (e*.a -. b*.d) in
       let y = (c -. a*.x) /. b in
       (x, y)
    | _ -> raise (Invalid_argument "line should be 6 nums.")

let print_answer (x, y) =
  let fmt x =
    let s = Printf.sprintf "%.3f" x in
    if s = "-0.000" then "0.000"
    else s
  in
  Printf.printf "%s %s\n" (fmt x) (fmt y)

let () =
  read_lines ()
  |> List.map split_nums
  |> List.map solve_se
  |> List.iter print_answer