human
Write me a code to insolite Numbers and the other steps required given the following:
Insolite Numbers | Function to check if a number is an Insolite numbers.
To store sum of squares of digits.
To store product of squares of digits.
extracting digit.
Driver Code.
Function Call"
How can the above be solved in Python?
assistant
#Here is code to insolite Numbers and the other steps required.
 def isInsolite ( n ) :
	N = n ;
	sum = 0 ;
	product = 1 ;
	while ( n != 0 ) :
		r = n % 10 ;
		sum = sum + r * r ;
		product = product * r * r ;
		n = n // 10 ;
	return ( ( N % sum == 0 ) and ( N % product == 0 ) ) ;
if __name__ == ' _ _ main _ _ ' :
	N = 111 ;
	if ( isInsolite ( N ) ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;