Nuclear deformations in the pairing-plus-quadrupole model