  Let $H \leq S_n$ be an intransitive group with orbits $\Omega_1, \Omega_2,
\ldots ,\Omega_k$. Then certainly $H$ is a subdirect product of the direct
product of its projections on each orbit, $H|_{\Omega_1} \times H|_{\Omega_2}
\times \ldots \times H|_{\Omega_k}$. Here we provide a polynomial time
algorithm for computing the finest partition $P$ of the $H$-orbits such that $H
= \prod_{c \in P} H|_c$ and demonstrate its usefulness in some applications.
