human
Make all numbers of an array equal | Function that returns true if all the array elements can be made equal with the given operation.
Divide number by 2.
Divide number by 3.
Driver code"
How can the above be solved in Python?

=====
Write me a code to make all numbers of an array equal and the other steps required?
assistant
#Here is code to make all numbers of an array equal and the other steps required.
 def EqualNumbers ( a , n ) :
	for i in range ( 0 , n ) :
		while a [ i ] % 2 == 0 :
			a [ i ] //= 2
		while a [ i ] % 3 == 0 :
			a [ i ] //= 3
		if a [ i ] != a [ 0 ] :
			return False
	return True
if __name__ == " _ _ main _ _ " :
	a = [ 50 , 75 , 150 ]
	n = len ( a )
	if EqualNumbers ( a , n ) :
		print ( " Yes " )
	else :
		print ( " No " )