One of the way is by finding the prime factors using prime factorisation method. If all the factors can be paired/made in a
doublet or can be made in a triplets, then it can be checked whether the number is a perfect square or a perfect cube, respectively.
For ex:
Let us check whether 15625 is a perfect square.
Using prime factorisation, we get
15625==
As, all the factors are paired.
So, its a perfect square.
Now, let us check whether 15625 is a perfect cube.
As, all factors can be made in a group of triplets.
So, its a perfect cube.