



from __future__ import annotations

from pathlib import Path


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


def 			snake_case_					( _lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						int  )				->       bool:
							UpperCAmelCase			:	tuple[int, int]										=		(xa, ya)
							UpperCAmelCase			:	tuple[int, int]										=		(xa - xa, ya - ya)
							UpperCAmelCase			:	tuple[int, int]										=		(xa - xa, ya - ya)
							UpperCAmelCase			:	float										=		-vector_product(_lowerCAmelCase       ,				_lowerCAmelCase  ) / vector_product(
							    _lowerCAmelCase       ,				_lowerCAmelCase  )
							UpperCAmelCase			:	float										=		+vector_product(_lowerCAmelCase       ,				_lowerCAmelCase  ) / vector_product(
							    _lowerCAmelCase       ,				_lowerCAmelCase  )

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


def 			snake_case_					( _lowerCAmelCase  :						str = "p102_triangles.txt"  )				->       int:
							UpperCAmelCase			:	str										=		Path(_lowerCAmelCase  ).parent.joinpath(_lowerCAmelCase  ).read_text(encoding='''utf-8'''  )

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

							UpperCAmelCase			:	int										=		0
							UpperCAmelCase			:	list[int]

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

							return ret


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










'''simple docstring'''






from __future__ import annotations


def 			snake_case_					( _lowerCAmelCase  :						list[int]       ,				_lowerCAmelCase  :						int  )				->       list[int]:
							UpperCAmelCase			:	dict[int, int]										=		{}
							for index, val in enumerate(_lowerCAmelCase  ):
														UpperCAmelCase			:	Tuple										=		target - val
														if compl in chk_map:
																					return [chk_map[compl], index]
														UpperCAmelCase			:	Any										=		index
							return []


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(F"{two_sum([2, 7, 11, 15], 9) = }")





