input = nil
while input = gets do
	input = input.split(" ").map{ |a|; a.strip ? a.strip.to_i : a.to_i }
	print input
	print "\n"
	a = input[0]
	b = input[1]
	c = input[2]
	d = input[3]
	e = input[4]
	f = input[5]
	puts "#{a}x + #{b}y = #{c}"
	puts "#{d}x + #{e}y = #{f}"
	
	a = d / a;
	b = d / b;
	c = d / c;
	
	g = a - d
	h = b - e
	i = c - f
	
	y = i / h
	x = (c - b) / a
	
	puts "#{sprintf("%.3f", x)} #{sprintf("%.3f", y)}"
end