No of ways of dividing (m+n+p) things into 3 groups containing m,n, p things respectively is given by the formula
\[\frac{(m+n+p)!}{m!n!p!}\]
Example
No of ways of distruting 9 things into 3 groups where these 3 groups contains 3 ,2 and 4 elements repectively is given by\[\frac{(9)!}{2!3!4!}\]=1260
Boundary condition \[m\neq n\neq p\]