EPS=1.0e-9
while input=gets do
  a,b,c,d,e,f=input.split(" ").collect do |x|
    x.to_f
  end
  num1=(c*e-b*f)/(a*e-b*d)
  num2=(a*f-c*d)/(a*e-b*d)
  print "%.3f" % (num1+EPS)," ","%.3f" % (num2+EPS) ,"\n"
end