while line = gets do
	num = line.split().map(&:to_i)
	a = num[0]
	b = num[1]
	c = num[2]
	d = num[3]
	e = num[4]
	f = num[5]
	# p num
	x = ((b * f) - (e * c))/((b * d) - (e * a))
	y = (c - a*x)/b
	puts sprintf("%.3f %.3f", x, y)
	# puts "#{x} #{y}"
end