Categories with finite products and coproducts