while line = gets
    a,b,c,d,e,f = line.split(" ").map(&:to_i)
    det = (a*e-b*d)
    if det != 0 
        x = ((e*c-b*f)*1.0 / det *1000).round/ 1000.0
        y =( (-c*d+a*f)*1.0 / det *1000).round/ 1000.0
        printf("%.3f %.3f\n",x,y)
    end
end