num = []
while a = gets
	num = []
	num = a.split(nil)
	num = num.map{|n| n.to_f}
	a = num[0]
	b = num[1]
	c = num[2]
	d = num[3]
	e = num[4]
	f = num[5]
	y = (c * d - a * f) / (b * d - a * e)
	x = (c - b * y) / a
	print sprintf("%.4f",x)
	print " "
	puts sprintf("%.4f",y)

end