Function that returns true if the product of all the array elements is a perfect square
static boolean isPerfectSquare ( int [ ] arr , int n ) { HashMap < Integer , Integer > umap = new HashMap < > ( ) ;