

"""simple docstring"""




from __future__ import annotations



def 	UpperCAmelCase__   (				A__   )      ->      bool:




   """simple docstring"""
   return len(set(A__   )   ) == len(A__   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()







"""simple docstring"""




from __future__ import annotations

import bisect



def 	UpperCAmelCase__   (				A__	,    A__	,    A__ = 0	,    A__ = -1   )      ->      int:




   """simple docstring"""
   if hi < 0:
      lowerCamelCase__						=			len(A__   )

   while lo < hi:
      lowerCamelCase__						=			lo + (hi - lo) // 2
      if sorted_collection[mid] < item:
         lowerCamelCase__						=			mid + 1
      else:
         lowerCamelCase__						=			mid

   return lo



def 	UpperCAmelCase__   (				A__	,    A__	,    A__ = 0	,    A__ = -1   )      ->      int:




   """simple docstring"""
   if hi < 0:
      lowerCamelCase__						=			len(A__   )

   while lo < hi:
      lowerCamelCase__						=			lo + (hi - lo) // 2
      if sorted_collection[mid] <= item:
         lowerCamelCase__						=			mid + 1
      else:
         lowerCamelCase__						=			mid

   return lo



def 	UpperCAmelCase__   (				A__	,    A__	,    A__ = 0	,    A__ = -1   )      ->      None:




   """simple docstring"""
   sorted_collection.insert(bisect_left(A__	,    A__	,    A__	,    A__   )	,    A__   )



def 	UpperCAmelCase__   (				A__	,    A__	,    A__ = 0	,    A__ = -1   )      ->      None:




   """simple docstring"""
   sorted_collection.insert(bisect_right(A__	,    A__	,    A__	,    A__   )	,    A__   )



def 	UpperCAmelCase__   (				A__	,    A__   )      ->      int | None:




   """simple docstring"""
   lowerCamelCase__						=			0
   lowerCamelCase__						=			len(A__   ) - 1

   while left <= right:
      lowerCamelCase__						=			left + (right - left) // 2
      lowerCamelCase__						=			sorted_collection[midpoint]
      if current_item == item:
         return midpoint
      elif item < current_item:
         lowerCamelCase__						=			midpoint - 1
      else:
         lowerCamelCase__						=			midpoint + 1
   return None



def 	UpperCAmelCase__   (				A__	,    A__   )      ->      int | None:




   """simple docstring"""
   lowerCamelCase__						=			bisect.bisect_left(A__	,    A__   )
   if index != len(A__   ) and sorted_collection[index] == item:
      return index
   return None



def 	UpperCAmelCase__   (				A__	,    A__	,    A__	,    A__   )      ->      int | None:




   """simple docstring"""
   if right < left:
      return None

   lowerCamelCase__						=			left + (right - left) // 2

   if sorted_collection[midpoint] == item:
      return midpoint
   elif sorted_collection[midpoint] > item:
      return binary_search_by_recursion(A__	,    A__	,    A__	,    midpoint - 1   )
   else:
      return binary_search_by_recursion(A__	,    A__	,    midpoint + 1	,    A__   )


if __name__ == "__main__":
     SCREAMING_SNAKE_CASE_     :			Optional[Any]	  =			input('''Enter numbers separated by comma:\n''').strip()
     SCREAMING_SNAKE_CASE_     :			int	  =			sorted(int(item) for item in user_input.split(''','''))
     SCREAMING_SNAKE_CASE_     :			Optional[Any]	  =			int(input('''Enter a single number to be found in the list:\n'''))
     SCREAMING_SNAKE_CASE_     :			Dict	  =			binary_search(collection, target)
     if result is None:
          print(F'''{target} was not found in {collection}.''')
     else:
          print(F'''{target} was found at position {result} in {collection}.''')




