while (input = STDIN.gets)!=nil do
  
    if input == "\n"
        break
    end
 
    data = [0.000,0.000,0.000,0.000,0.000,0.000]
     
    input = input.split(" ")
 
    for i in 0..5 
        data[i] = input[i].to_f
    end
         
    num = (data[0]*data[4]) - (data[1]*data[3])
 
    x = ( data[4]    *data[2] + (data[1]*-1)*data[5])/num + 0
    y = ((data[3]*-1)*data[2] +  data[0]    *data[5])/num + 0
     
    print sprintf("%.3f %.3f\n",x ,y )
     
end