while io = gets
  a,b,c,d,e,f = io.split(" ").map(&:to_f)
  delta = a*e-b*d
  x = ((e*c-b*f)/delta).round(3)
  y = (a*f-c*d)/delta.round(3)
  if x == 0
    x = 0.000
  end
  if y == 0
    y = 0.000
  end
  puts "#{sprintf("%.3f", x)} #{sprintf("%.3f", y)}"
end