





from __future__ import annotations

from dataclasses import dataclass




@dataclass
class     SCREAMING_SNAKE_CASE__ :
 __SCREAMING_SNAKE_CASE							       =	42
 __SCREAMING_SNAKE_CASE							       =	None
 __SCREAMING_SNAKE_CASE							       =	None


def 	UpperCamelCase__(       UpperCamelCase__			:       Optional[Any]  )->bool:

       # Validation
       def is_valid_tree(UpperCamelCase__			:       int  ) -> bool:
              if node is None:
                     return True

              if not isinstance(_lowerCAmelCase ,     _lowerCAmelCase  ):
                     return False

              try:
                     float(node.data  )
              except (TypeError, ValueError):
                     return False

              return is_valid_tree(node.left  ) and is_valid_tree(node.right  )

       if not is_valid_tree(_lowerCAmelCase  ):
              raise ValueError(
                  '''Each node should be type of TreeNode and data should be float.'''  )

       def is_binary_search_tree_recursive_check(
           UpperCamelCase__			:       Union[str, Any] ,     UpperCamelCase__			:       Dict ,     UpperCamelCase__			:       List[str]  ) -> bool:

              if node is None:
                     return True

              return (
                  left_bound < node.data < right_bound
                  and is_binary_search_tree_recursive_check(node.left ,     _lowerCAmelCase ,     node.data  )
                  and is_binary_search_tree_recursive_check(
                      node.right ,     node.data ,     _lowerCAmelCase  )
              )

       return is_binary_search_tree_recursive_check(_lowerCAmelCase ,     -float('''inf'''  ) ,     float('''inf'''  )  )


if __name__ == "__main__":
       import doctest

       doctest.testmod()












from __future__ import annotations

from functools import lru_cache
from math import ceil

__lowerCamelCase       :     str   =     100

__lowerCamelCase       :     Any   =     set(range(3, NUM_PRIMES, 2))
primes.add(2)
__lowerCamelCase       :     int

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
    if prime not in primes:
        continue
    primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))



@lru_cache(maxsize=100     )
def 		A_				(     _lowerCAmelCase     )						-> set[int]:
 if number_to_partition < 0:
  return set()
 elif number_to_partition == 0:
  return {1}

 UpperCamelCase	:					set[int]       	=   set()
 UpperCamelCase	:					int
 UpperCamelCase	:					int

 for prime in primes:
  if prime > number_to_partition:
   continue
  for sub in partition(number_to_partition - prime     ):
   ret.add(sub * prime     )

 return ret



def 		A_				(     _lowerCAmelCase = 5000     )						-> int | None:
 for number_to_partition in range(1							,   _lowerCAmelCase     ):
  if len(partition(_lowerCAmelCase     )     ) > number_unique_partitions:
   return number_to_partition
 return None


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