GRE test prep question [LCM and divisors] 
Let $S$ be the set of all positive integers $n$ such that $n^2$ is a
multiple of both $24$ and $108$.  Which of the following integers are
divisors of every integer $n$ in $S$ ?
Indicate all such integers:
$A:12$
$B:24$
$C:36$
$D:72$

The answers are $A$ and $C$
First I took the lcm of $24$ and $108$ which is $2^3\times3^3$ but then it says that "the prime factorization of a square number must contain only even exponents.  Thus, the least multiple of $(2^3)(3^3)$ that is a square is $(2^4)(3^4)$"
Can somebody explain why that is true?
What if the lcm was $2^3\times3^4$ ? Would I just make it $2^4\times3^4$ ?
Help!

Let $n=p_1^{a_1}\cdots p_r^{a_r}$ where the $p_i$ are primes, so $n^2=p_1^{2a_1}\cdots p_r^{2a_r}$.  As you observed, $n^2$ must be a multiple of $LCM(24, 108)=2^{3} 3^{3}$, so $2a_1\ge 3$ and $2a_2\ge 3$ with $p_1=2$ and $p_2=3$.
Therefore $a_1\ge 2$ and $a_2\ge 2$, so n is a multiple of $2^{2} 3^{2}=36$.   Thus S consists of all positive multiples of 36, so the integers which divide every integer in S are simply the divisors of 36.
