human
Check if product of array containing prime numbers is a perfect square | Function that returns true if the product of all the array elements is a perfect square.
Update the frequencies of all the array elements.
If frequency of some element in the array is odd.
Driver code"
Solution in Python:
 Write me a code to check if product of array containing prime numbers is a perfect square and the other steps required?
assistant
#Here is code to check if product of array containing prime numbers is a perfect square and the other steps required.
 def isPerfectSquare ( arr , n ) :
	umap = dict . fromkeys ( arr , n ) ;
	for key in arr :
		umap [ key ] += 1 ;
	for key in arr :
		if ( umap [ key ] % 2 == 1 ) :
			return False ;
	return True ;
if __name__ == " _ _ main _ _ " :
	arr = [ 2 , 2 , 7 , 7 ] ;
	n = len ( arr )
	if ( isPerfectSquare ( arr , n ) ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;