





'''simple docstring'''

import math




def  _a     (				lowerCAmelCase_						):





      """simple docstring"""



      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5      ,   int(math.sqrt(lowerCAmelCase_						) + 1						)      ,   6						):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True




def  _a     (				lowerCAmelCase_ = 600_851_475_143						):





      """simple docstring"""



      try:
            _snake_case		:						Any         =  int(lowerCAmelCase_						)
      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.'''						)
      _snake_case		:						Tuple         =  0
      if is_prime(lowerCAmelCase_						):
            return n
      while n % 2 == 0:
            n //= 2
      if is_prime(lowerCAmelCase_						):
            return n
      for i in range(3      ,   int(math.sqrt(lowerCAmelCase_						)						) + 1      ,   2						):
            if n % i == 0:
                  if is_prime(n // i						):
                        _snake_case		:						str         =  n // i
                        break
                  elif is_prime(lowerCAmelCase_						):
                        _snake_case		:						Dict         =  i
      return max_number


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









'''simple docstring'''

from __future__ import annotations




def  _a     (				lowerCAmelCase_      ,   lowerCAmelCase_      ,   lowerCAmelCase_      ,   lowerCAmelCase_						):





      """simple docstring"""



      if counter == 0 or capacity == 0:
            return 0

      # If weight of the nth item is more than Knapsack of capacity,
      #   then this item cannot be included in the optimal solution,
      # else return the maximum of two cases:
      #   (1) nth item included
      #   (2) not included
      if weights[counter - 1] > capacity:
            return knapsack(lowerCAmelCase_      ,   lowerCAmelCase_      ,   lowerCAmelCase_      ,   counter - 1						)
      else:
            _snake_case		:						List[str]         =  capacity - weights[counter - 1]
            _snake_case		:						Tuple         =  values[counter - 1] + knapsack(
                lowerCAmelCase_      ,   lowerCAmelCase_      ,   lowerCAmelCase_      ,   counter - 1						)
            _snake_case		:						Any         =  knapsack(lowerCAmelCase_      ,   lowerCAmelCase_      ,   lowerCAmelCase_      ,   counter - 1						)
            return max(lowerCAmelCase_      ,   lowerCAmelCase_						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()


