Multidimensional integrable vacuum cosmology with two curvatures