from math import pow


def 	lowerCamelCase					(	UpperCamelCase     :				int			,       UpperCamelCase     :				int			,       UpperCamelCase     :				int			,       UpperCamelCase     :				int			,       UpperCamelCase     :				int			,       )   ->    tuple[int, int]:
		if current_sum == needed_sum:
				# If the sum of the powers is equal to needed_sum, then we have a solution.
				solutions_count += 1
				return current_sum, solutions_count

		_lowerCamelCase				   =  int(pow(UpperCamelCase			,       UpperCamelCase							)							)
		if current_sum + i_to_n <= needed_sum:
				# If the sum of the powers is less than needed_sum, then continue adding powers.
				current_sum += i_to_n
				_lowerCamelCase   ,							_lowerCamelCase				   =  backtrack(
				    UpperCamelCase			,       UpperCamelCase			,       current_number + 1			,       UpperCamelCase			,       UpperCamelCase							)
				current_sum -= i_to_n
		if i_to_n < needed_sum:
				# If the power of i is less than needed_sum, then try with the next power.
				_lowerCamelCase   ,							_lowerCamelCase				   =  backtrack(
				    UpperCamelCase			,       UpperCamelCase			,       current_number + 1			,       UpperCamelCase			,       UpperCamelCase							)
		return current_sum, solutions_count


def 	lowerCamelCase					(	UpperCamelCase     :				int			,       UpperCamelCase     :				int							)   ->    int:
		if not (1 <= needed_sum <= 10_00 and 2 <= power <= 10):
				raise ValueError(
				    'Invalid input\n'
				    'needed_sum must be between 1 and 1000, power between 2 and 10.'							)

		return backtrack(UpperCamelCase			,       UpperCamelCase			,       1			,       0			,       0							)[1]  # Return the solutions_count


if __name__ == "__main__":
				import doctest

				doctest.testmod()
def 	lowerCamelCase					(	UpperCamelCase     :				int = 60_08_51_47_51_43							)   ->    int:

		try:
				_lowerCamelCase				   =  int(UpperCamelCase							)
		except (TypeError, ValueError):
				raise TypeError('Parameter n must be int or castable to int.'							)
		if n <= 0:
				raise ValueError('Parameter n must be greater than or equal to one.'							)
		_lowerCamelCase				   =  1
		_lowerCamelCase				   =  2
		while i * i <= n:
				while n % i == 0:
						_lowerCamelCase				   =  i
						n //= i
				i += 1
		if n > 1:
				_lowerCamelCase				   =  n
		return int(UpperCamelCase							)


if __name__ == "__main__":
				print(F'''{solution() = }''')