while line = gets
   num = line.split(' ').map(&:to_f)
   a,b,c,d,e,f = num
   x = ((b*f-c*e)/(b*d-a*e))
   y = ((c*d-a*f)/(b*d-a*e))
   x3 = sprintf("%.3f", x)
   y3 = sprintf("%.3f", y)
   if x3 == "-0.000"
	  x3 = "0.000"
   end
   if y3 == "-0.000"
	  y3 = "0.000"
   end
   print x3+" "+y3+"\n"
end