


def        lowerCAmelCase__ (			a__:		int       )  ->		List[str]:


							'''simple docstring'''





							return 1 if digit in (0, 1) else (digit * factorial(digit - 1       ))

def        lowerCAmelCase__ (			a__:		int       )  ->		str:


							'''simple docstring'''





							_UpperCAmelCase 		=			0
							_UpperCAmelCase 		=			number
							while duplicate > 0:
														_UpperCAmelCase 		=			divmod(a__			,  1_0       )
														fact_sum += factorial(a__       )
							return fact_sum == number


if __name__ == "__main__":
		print('''Program to check whether a number is a Krisnamurthy Number or not.''')
		lowerCAmelCase__  :List[str]   			=							int(input('''Enter number: ''').strip())
		print(
		    f'''{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number.'''
		)

from maths.prime_check import is_prime





def    __lowercase     (						lowerCamelCase					:     int	):
 if not isinstance(lowerCamelCase  ,  lowerCamelCase	):
  UpperCamelCase_					:						List[str] =					F"Input value of [number={number}] must be an integer"
  raise TypeError(lowerCamelCase	)
 if is_prime(lowerCamelCase	) and is_prime(number + 2	):
  return number + 2
 else:
  return -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()



