Let's say I'm considering the 3p^2 electrons. From the Pauli Exclusion Principle, we know that two electrons cannot have the same state, which in this case means ml and ms cannot both be the same for each electron.
What this means is that the following 6 terms must not be allowed:
m_{l1}...