For $n$ to be a perfect square, a necessary and sufficient condition is $\alpha_1, \alpha_2, \cdots, \alpha_k$ even, such that $\sqrt{p_i^{\alpha_i}}$ be an integer $\implies$ $\sqrt{n}$ be an integer. Otherwise, $\sqrt{n}$ is irrational and hence $n$ is not a perfect square.