



'''simple docstring'''







from math import sqrt







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		SCREAMING_SNAKE_CASE_						:Tuple										=      [1]
		for i in range(2 ,		int(sqrt(SCREAMING_SNAKE_CASE     )     ) + 1 ,		1     ):
				if number % i == 0:
						values.append(SCREAMING_SNAKE_CASE     )
						if int(number // i     ) != i:
								values.append(int(number // i     )     )
		return sorted(SCREAMING_SNAKE_CASE     )







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		return sum(factors(SCREAMING_SNAKE_CASE     )     ) > n







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		SCREAMING_SNAKE_CASE_						:List[Any]										=      factors(SCREAMING_SNAKE_CASE     )
		SCREAMING_SNAKE_CASE_						:Union[str, Any]										=      len(SCREAMING_SNAKE_CASE     )
		SCREAMING_SNAKE_CASE_						:Dict										=      [[0 for i in range(number + 1     )] for j in range(r + 1     )]
		for i in range(r + 1     ):
				SCREAMING_SNAKE_CASE_						:Tuple										=      True

		for i in range(1 ,		number + 1     ):
				SCREAMING_SNAKE_CASE_						:Optional[Any]										=      False

		for i in range(1 ,		r + 1     ):
				for j in range(1 ,		number + 1     ):
						if j < values[i - 1]:
								SCREAMING_SNAKE_CASE_						:int										=      subset[i - 1][j]
						else:
								SCREAMING_SNAKE_CASE_						:Optional[Any]										=      subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

		return subset[r][number] != 0







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		return abundant(SCREAMING_SNAKE_CASE     ) and not semi_perfect(SCREAMING_SNAKE_CASE     )


if __name__ == "__main__":
							import doctest

							doctest.testmod(verbose=True)
							for number in (69, 70, 71):
														print(f"""{number} is {"" if weird(number) else "not "}weird.""")





'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE ,		SCREAMING_SNAKE_CASE ,		SCREAMING_SNAKE_CASE     ):
		assert b != 0, "This cannot accept modulo that is == 0"
		if n == 0:
				return 1

		if n % 2 == 1:
				return (bin_exp_mod(SCREAMING_SNAKE_CASE ,		n - 1 ,		SCREAMING_SNAKE_CASE     ) * a) % b

		SCREAMING_SNAKE_CASE_						:List[str]										=      bin_exp_mod(SCREAMING_SNAKE_CASE ,		n / 2 ,		SCREAMING_SNAKE_CASE     )
		return (r * r) % b


if __name__ == "__main__":
							try:
														SCREAMING_SNAKE_CASE__     : Any				=   int(input("""Enter Base : """).strip())
														SCREAMING_SNAKE_CASE__     : str				=   int(input("""Enter Power : """).strip())
														SCREAMING_SNAKE_CASE__     : List[Any]				=   int(input("""Enter Modulo : """).strip())
							except ValueError:
														print("""Invalid literal for integer""")

							print(bin_exp_mod(BASE, POWER, MODULO))
