a = 0
while line = STDIN.gets
	if a != 0 then
		print("\n")
	end

	if(/exit/ =~ line)
		break
	end
	temp = line.scan(/\d+|-\d+/)
	a = temp[0].to_i
	b = temp[1].to_i
	c = temp[2].to_i
	d = temp[3].to_i
	e = temp[4].to_i
	f = temp[5].to_i
	x = (c*e-b*f)/(a*e-b*d)
	y = (c*d-f*a)/(b*d-e*a)
	print sprintf("%.3f %.3f",x,y)
	a += 1
end