while data = gets
	data.chomp
	data2 = data.split
	data2.collect! {|i|i.to_i}
	delta = data2[0] * data2[4] - data2[3] * data2[1]
	x = (data2[2] * data2[4] - data2[1] * data2[5]) / delta
	y = (data2[0] * data2[5] - data2[2] * data2[3]) / delta
	print "%.4f " %x
	print "%.4f\n" %y
end