Let $X$ be a finite set, and define $G$ to be the symmetric group $S_X$.
Now, for any $A \subset X$, we define $B$ as the complement of $A$ in $X$, i.e. $B = X \setminus A$. Define $H = \{g \in G \mid g(A) = A \}$, i.e. the subgroup of permutations of $G$ under which $A$ is invariant.
Show that $H \cong S_A \times S_B$.
Intuitively, I can see this being true, in that $A, B$ partition $X$, and so for any $h \in H$, it's clear that the "part of" $h$ permuting $A$ is isomorphic to $S_A$ and the "rest of" $h$ is isomorphic to $S_B$. This is quite a hand-wavy argument, and I'm wondering if there's a way to formalize it.
Hint: It suffices to show $S_AS_B=H, S_A\cap S_B=\{e\}$ and $S_AS_B=S_BS_A$.
Note: there's a natural way to embed $S_A$ and $S_B$ into $H$.