Car-Parrinello molecular dynamics simulations of the flexibility of isolated DNA bases have been carried out. The comparison of lowest ring out-of-plane vibrations calculated by using MP2/cc-pvdz and BLYP/PW methods reveals that the DFT method with the plane wave basis set reasonably reproduces out-of-plane deformability of the pyrimidine ring in nucleic acid bases and could be used for reliable modeling of conformational flexibility of nucleobases. The conformational phase space of pyrimidine rings in thymine, cytosine, guanine, and adenine has been investigated by using the ab initio Car-Parrinello molecular dynamics method. It is demonstrated that all nucleic acid bases are highly flexible molecules and possess a nonplanar effective conformation of the pyrimidine ring despite the fact that the planar geometry corresponds to a minimum on the potential energy surface. The population of the planar geometry of the pyrimidine ring does not exceed 30%. Among the nonplanar conformations of the pyrimidine rings, the boat-like and half-chair conformations are the most populated.