A characterization of balanced manifolds