while input = STDIN.gets

    if(/exit/ =~ input)
        break
    end

	data = [0.000,0.000,0.000,0.000,0.000,0.000]
	xy   = [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])

	xy[0] = ( data[4]    *data[2] + (data[1]*-1)*data[5])/num
	xy[1] = ((data[3]*-1)*data[2] +  data[0]    *data[5])/num
	
	if xy[0] == -0 then
		xy[0]　= 0
    end
    if xy[1] == 0 then
		xy[1] = 0
    end
	
    print sprintf("%.3f %.3f\n",xy[0],xy[1])
	
end