loop{

	data = [0.000,0.000,0.000,0.000,0.000,0.000]
	xy   = [0.000,0.000]
	
	input = gets.chomp
	if input == ""
		break;
	end
	input = input.split
	for i in 0..5 
		data[i] = input[i].to_f
	end
	
	data[1] = data[1]*-1
	data[3] = data[3]*-1
	
	num = 1/(data[0]*data[4] - data[1]*data[3])
	
	xy[0] = num*((data[4]*data[2]) + (data[1]*data[5]))
	xy[1] = num*((data[3]*data[2]) + (data[0]*data[5]))
	
	xy.each do |i|
		if xy[i] == -0.000
			xy[i] = 0.000
		end
	end
	
	print(sprintf( "%.3f", xy[0] ), " ", sprintf( "%.3f", xy[1] ), "\n")

}