while buf=gets do
        a,b,c,d,e,f = buf.split.map(&:to_i)
        x = ((e*c-b*f)*1.0/(a*e-b*d)*1000).round/1000.0
        y = ((a*f-c*d)*1.0/(a*e-b*d)*1000).round/1000.0
#       if x.to_s[0]=='-'
#               x*=-1
#       end
#       if y.to_s[0]=='-'
#               y*=-1
#       end
        printf("%.3f %.3f\n",x,y)

end