We consider anisotropic cosmological models with an universe of dimension 4 or more, factorized into n ≥ 2 Ricci-flat spaces, containing an m-component perfect fluid of m noninteracting homogeneous minimally coupled scalar fields under special conditions. We describe the dynamics of the universe: It has a Kasner-like behaviour near the singularity and isotropizes during the expansion to infinity.Some of the considered models are integrable, and classical as well as quantum solutions are found. Some solutions produce inflation from "nothing". There exist classical asymptotically anti-de Sitter wormholes, and quantum wormholes with discrete spectrum.