"""simple docstring"""







from __future__ import annotations

from pathlib import Path



def       A__    (	lowercase_     :	tuple[int, int]      , lowercase_     :	tuple[int, int]						)  ->							int:
   return pointa[0] * pointa[1] - pointa[1] * pointa[0]



def       A__    (	lowercase_     :	int      , lowercase_     :	int      , lowercase_     :	int      , lowercase_     :	int      , lowercase_     :	int      , lowercase_     :	int						)  ->							bool:
   __lowerCamelCase    		=					(xa, ya)
   __lowerCamelCase    		=					(xa - xa, ya - ya)
   __lowerCamelCase    		=					(xa - xa, ya - ya)
   __lowerCamelCase    		=					-vector_product(lowercase_      , lowercase_						) / vector_product(
       lowercase_      , lowercase_						)
   __lowerCamelCase    		=					+vector_product(lowercase_      , lowercase_						) / vector_product(
       lowercase_      , lowercase_						)

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



def       A__    (	lowercase_     :	str = "p102_triangles.txt"						)  ->							int:
   __lowerCamelCase    		=					Path(lowercase_						).parent.joinpath(lowercase_						).read_text(encoding='utf-8'						)

   __lowerCamelCase    		=					[]
   for line in data.strip().split('\n'						):
      triangles.append([int(lowercase_						) for number in line.split(','						)]						)

   __lowerCamelCase    		=					0
   __lowerCamelCase    		=					42

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

   return ret


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








'''simple docstring'''






from __future__ import annotations







def 		SCREAMING_SNAKE_CASE__					(							_SCREAMING_SNAKE_CASE  ,					_SCREAMING_SNAKE_CASE  ,					_SCREAMING_SNAKE_CASE  ):
		if len(_SCREAMING_SNAKE_CASE  ) == 0:
				raise ValueError('''find_min() arg is an empty sequence'''  )
		if (
		    left >= len(_SCREAMING_SNAKE_CASE  )
		    or left < -len(_SCREAMING_SNAKE_CASE  )
		    or right >= len(_SCREAMING_SNAKE_CASE  )
		    or right < -len(_SCREAMING_SNAKE_CASE  )
		):
				raise IndexError('''list index out of range'''  )
		if left == right:
				return nums[left]
		lowerCAmelCase_   :       Dict    							=(left + right) >> 1  # the middle
		lowerCAmelCase_   :       Optional[int]    							=find_min(_SCREAMING_SNAKE_CASE  ,					_SCREAMING_SNAKE_CASE  ,					_SCREAMING_SNAKE_CASE  )  # find min in range[left, mid]
		lowerCAmelCase_   :       Any    							=find_min(_SCREAMING_SNAKE_CASE  ,					mid + 1  ,					_SCREAMING_SNAKE_CASE  )  # find min in range[mid + 1, right]

		return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
							import doctest

							doctest.testmod(verbose=True)






