We study four-dimensional SU(N ) Yang-Mills theory on R×T 3 = R×S 1 A ×S 1 B × S 1 C , with a twisted boundary condition by a Z N center symmetry imposed on S 1 B ×S 1 C . This setup has no IR zero modes and hence is free from IR divergences which could spoil transseries expansion for physical observables. Moreover, we show that the center symmetry is preserved at weak coupling regime. This is shown by first reducing the theory on T 2 = S A × S B , to connect the model to the two-dimensional CP N −1 -model. Then, we prove that the twisted boundary condition by the center symmetry for the Yang-Mills is reduced to the twisted boundary condition by the Z N global symmetry of CP N −1 . There are N classical vacua, and fractional instantons connecting those N vacua dynamically restore the center symmetry. We also point out the presence of singularities on the Borel plane which depend on the shape of the compactification manifold, and comment on its implications.