if __FILE__ == $0
	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
		puts "#{sprintf("%.03f", x)} #{sprintf("%.03f", y)}"
	end
end