input = nil
while input = gets do
	input = input.split(" ").map{ |a|; a.strip ? a.strip.to_i : a.to_i }
	a = input[0]
	b = input[1]
	c = input[2]
	d = input[3]
	e = input[4]
	f = input[5]
	
	n = d / a
	
	g = a * n
	h = b * n
	i = c * n
	
	j = g - d # => 0
	k = h - e
	l = i - f
	
	y = l / k
	x = c - b / a
	
	puts "#{sprintf("%.3f", x)} #{sprintf("%.3f", y)}"
end
__END__
頭が働かないです