By using first-principles calculations and symmetry analysis, we propose two topological nontrivial two-dimensional (2D) materials: CdAs-164 and CdAs-187. The results of binding energies, phonon dispersions, mechanical constants and thermodynamic stability demonstrate that the two materials are stable and may be synthesized in future experiments. When spin-orbit coupling (SOC) is not considered, the former is a typical Dirac semimetal with six equivalent Dirac points on the paths of Γ-M. These Dirac points are protected by vertical mirror symmetry. The latter is a nodal ring semimetal with the coexistence of two type-I nodal rings and one type-II nodal ring, and these nodal rings are protected by the horizontal mirror operation σh. After SOC is considered, both of the two materials turn into topological insulator with Z2= 1. Our findings indicate that CdAs-164 and CdAs-187 are excellent candidates to explore the nontrivial topological states of 2D materials.