def calc_simultaneeous(args)
  x = y = 0
  args.each_cons(6) do |a, b, c, d, e, f|
    y = (f - d * c / a) / (e - (d * b / a))
    x = (c - b * y) / a
  end
  "%.3f %.3f"%[x, y]
end

while input = gets
  puts calc_simultaneeous(input.chomp.split(' ').map! { |elm| elm.to_f })
end