while (input = STDIN.gets)!=nil do

	if input == "\n"
		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
	
	printf "%.3f %.3f\n", xy[0].to_f, xy[1].to_f

end