

'''simple docstring'''







from __future__ import annotations

from typing import Generic, TypeVar

_lowerCamelCase    =  TypeVar('T')
class 					__a   (		_snake_case  ):
						pass






class 					__a   (		_snake_case  ):
						pass






class 					__a   (		Generic[T]  ):

						def __init__(		self	:						Optional[int]    ,			lowercase__	:						int = 10)						->List[str]:

							"""simple docstring"""



							_lowercase							=     []
							_lowercase							=     limit

						def __bool__(		self	:						str)						->bool:

							"""simple docstring"""



							return bool(self.stack)

						def __str__(		self	:						Union[str, Any])						->str:

							"""simple docstring"""



							return str(self.stack)

						def 	_UpperCAmelCase							(		self	:						Any    ,			lowercase__	:						T)						->None:

							"""simple docstring"""



							if len(self.stack) >= self.limit:
								raise StackOverflowError
							self.stack.append(lowercase__)

						def 	_UpperCAmelCase							(		self	:						str)						->T:

							"""simple docstring"""



							if not self.stack:
								raise StackUnderflowError
							return self.stack.pop()

						def 	_UpperCAmelCase							(		self	:						Any)						->T:

							"""simple docstring"""



							if not self.stack:
								raise StackUnderflowError
							return self.stack[-1]

						def 	_UpperCAmelCase							(		self	:						List[str])						->bool:

							"""simple docstring"""



							return not bool(self.stack)

						def 	_UpperCAmelCase							(		self	:						List[str])						->bool:

							"""simple docstring"""



							return self.size() == self.limit

						def 	_UpperCAmelCase							(		self	:						Optional[int])						->int:

							"""simple docstring"""



							return len(self.stack)


						def __contains__(		self	:						List[str]    ,			lowercase__	:						T)						->bool:

							"""simple docstring"""



							return item in self.stack






def 					_SCREAMING_SNAKE_CASE		(						):
	_lowercase							=     Stack(10	)
	assert bool(snake_case_	) is False
	assert stack.is_empty() is True
	assert stack.is_full() is False
	assert str(snake_case_	) == "[]"

	try:
		_lowercase							=     stack.pop()
		raise AssertionError  # This should not happen
	except StackUnderflowError:
		assert True  # This should happen

	try:
		_lowercase							=     stack.peek()
		raise AssertionError  # This should not happen
	except StackUnderflowError:
		assert True  # This should happen

	for i in range(10	):
		assert stack.size() == i
		stack.push(snake_case_	)

	assert bool(snake_case_	)
	assert not stack.is_empty()
	assert stack.is_full()
	assert str(snake_case_	) == str(list(range(10	)	)	)
	assert stack.pop() == 9
	assert stack.peek() == 8

	stack.push(100	)
	assert str(snake_case_	) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 100]	)

	try:
		stack.push(200	)
		raise AssertionError  # This should not happen
	except StackOverflowError:
		assert True  # This should happen

	assert not stack.is_empty()
	assert stack.size() == 10

	assert 5 in stack
	assert 55 not in stack


if __name__ == "__main__":
							test_stack()







'''simple docstring'''







from __future__ import annotations

from pathlib import Path






def 					_SCREAMING_SNAKE_CASE		(						snake_case_							,       snake_case_	):
	return pointa[0] * pointa[1] - pointa[1] * pointa[0]






def 					_SCREAMING_SNAKE_CASE		(						snake_case_							,       snake_case_							,       snake_case_							,       snake_case_							,       snake_case_							,       snake_case_	):
	_lowercase							=     (xa, ya)
	_lowercase							=     (xa - xa, ya - ya)
	_lowercase							=     (xa - xa, ya - ya)
	_lowercase							=     -vector_product(snake_case_							,       snake_case_	) / vector_product(
	    snake_case_							,       snake_case_	)
	_lowercase							=     +vector_product(snake_case_							,       snake_case_	) / vector_product(
	    snake_case_							,       snake_case_	)

	return a > 0 and b > 0 and a + b < 1






def 					_SCREAMING_SNAKE_CASE		(						snake_case_ = "p102_triangles.txt"	):
	_lowercase							=     Path(snake_case_	).parent.joinpath(snake_case_	).read_text(encoding="""utf-8"""	)

	_lowercase							=     []
	for line in data.strip().split("""\n"""	):
		triangles.append([int(snake_case_	) for number in line.split(""","""	)]	)

	_lowercase							=     0
	_lowercase							=     42

	for triangle in triangles:
		ret += contains_origin(*snake_case_	)

	return ret


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




