module Input
	def numread()
		s = gets().split()
		p = Array.new()
		for i in 0...s.size()
			p[i] = s[i].to_i()
		end
		return p
	end
	
	module_function:numread
end

include Input

loop{
	if(STDIN.eof())
		break
	end
	w = numread()
	x = (w[2] * w[4] - w[1] * w[5]).to_f / (w[0] * w[4] - w[1] * w[3])
	y = (w[2] * w[3] - w[0] * w[5]).to_f / (w[1] * w[3] - w[0] * w[4])
	print(sprintf("%.3f %.3f\n",x,y))
}