  We first show that simply connected co-$H$-spaces and connected $H$-spaces
can be uniquely decomposed into prime factors in the homotopy category of
pointed $p$-local spaces of finite type, which is used to develop a $p$-local
version of Gray's correspondence between homotopy types of prime co-$H$-spaces
and homotopy types of prime $H$-spaces, and the split fibration which connects
them as well. Further, we use the unique decomposition theorem to study the
homotopy rigidity problem for classic functors. Among others, we prove that
$\Sigma \Omega$ and $\Omega$ are homotopy rigid on simply connected $p$-local
co-$H$-spaces of finite type, and $\Omega\Sigma $ and $\Sigma$ are homotopy
rigid on connected $p$-local $H$-spaces of finite type.
