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