Cusp points and critical points in two-dimensional endomorphisms