Check if a number is Square Number or not
We use the following basic fact about square number $\textbf{M}$
\[ \textbf{M} = \textbf{p}_1^{2k_1} \times \textbf{p}_2^{2k_2} \times \dots \times \textbf{P}_n^{2k_n} \quad k_i \in \mathbf{N}\\ \]
                            public static boolean squareNumber(int n){
                                int num = (int)Math.sqrt(n);
                                List list = Aron.allPrimes(num);

                                for (int i = 0; i < list.size(); i++) {
                                    Integer p = list.get(i);
                                    if (n % (p * p) == 0)
                                        n = n / (p * p);
                                }
                                if(n == 1)
                                    return true;
                                else
                                    return false;
                            }