
from __future__ import annotations

import bisect






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int       ,					__lowercase   :	int = 0       ,					__lowercase   :	int = -1 ) ->  int:
			if hi < 0:
						_snake_case		=			len(__lowercase )

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

			return lo






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int       ,					__lowercase   :	int = 0       ,					__lowercase   :	int = -1 ) ->  int:
			if hi < 0:
						_snake_case		=			len(__lowercase )

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

			return lo






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int       ,					__lowercase   :	int = 0       ,					__lowercase   :	int = -1 ) ->  None:
			sorted_collection.insert(bisect_left(__lowercase       ,					__lowercase       ,					__lowercase       ,					__lowercase )       ,					__lowercase )






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int       ,					__lowercase   :	int = 0       ,					__lowercase   :	int = -1 ) ->  None:
			sorted_collection.insert(bisect_right(__lowercase       ,					__lowercase       ,					__lowercase       ,					__lowercase )       ,					__lowercase )






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int ) ->  int | None:
			_snake_case		=			0
			_snake_case		=			len(__lowercase ) - 1

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






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int ) ->  int | None:
			_snake_case		=			bisect.bisect_left(__lowercase       ,					__lowercase )
			if index != len(__lowercase ) and sorted_collection[index] == item:
						return index
			return None






def        a_		(       __lowercase   :	list[int]       ,					__lowercase   :	int       ,					__lowercase   :	int       ,					__lowercase   :	int ) ->  int | None:
			if right < left:
						return None

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

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


if __name__ == "__main__":
			_lowerCamelCase       :				int       =			input('''Enter numbers separated by comma:\n''').strip()
			_lowerCamelCase       :				Dict       =			sorted(int(item) for item in user_input.split(''','''))
			_lowerCamelCase       :				Union[str, Any]       =			int(input('''Enter a single number to be found in the list:\n'''))
			_lowerCamelCase       :				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}.')

class    SCREAMING_SNAKE_CASE__     :





	'''simple docstring'''



	def __init__(  self	:    List[str]			,  lowercase	:    list[int]	):


				'''simple docstring'''


				_snake_case		=			len(lowercase	)
				_snake_case		=			[0] * len_array

				if len_array > 0:
							_snake_case		=			array[0]

				for i in range(1			,  lowercase	):
							_snake_case		=			self.prefix_sum[i - 1] + array[i]



	def  A							(  self	:    Optional[Any]			,  lowercase	:    int			,  lowercase	:    int	):


				'''simple docstring'''


				if start == 0:
							return self.prefix_sum[end]

				return self.prefix_sum[end] - self.prefix_sum[start - 1]





	def  A							(  self	:    Union[str, Any]			,  lowercase	:    int	):


				'''simple docstring'''


				_snake_case		=			{0}
				for sum_item in self.prefix_sum:
							if sum_item - target_sum in sums:
										return True

							sums.add(lowercase	)

				return False


if __name__ == "__main__":
			import doctest

			doctest.testmod()