



"""simple docstring"""


from itertools import compress, repeat
from math import ceil, sqrt

def 					_lowerCAmelCase (  lowercase_		):

						if num <= 2:
												return []
						if num == 3:
												return [2]

						# Odd sieve for numbers in range [3, num - 1]
						UpperCAmelCase			 =					bytearray(B'\x01'		) * ((num >> 1) - 1)

						for i in range(3						,      int(sqrt(lowercase_		)		) + 1						,      2		):
												if sieve[(i >> 1) - 1]:
																		UpperCAmelCase			 =					i**2
																		UpperCAmelCase			 =					repeat(
																		    0						,      ceil((num - i_squared) / (i << 1)		)		)

						return [2] + list(compress(range(3						,      lowercase_						,      2		)						,      lowercase_		)		)


if __name__ == "__main__":
				import doctest

				doctest.testmod()











from __future__ import annotations

from pathlib import Path







def       _a (		SCREAMING_SNAKE_CASE_				:							tuple[int, int] , SCREAMING_SNAKE_CASE_				:							tuple[int, int]	):
					return pointa[0] * pointa[1] - pointa[1] * pointa[0]







def       _a (		SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int	):
					__lowerCAmelCase							  =			(xa, ya)
					__lowerCAmelCase							  =			(xa - xa, ya - ya)
					__lowerCAmelCase							  =			(xa - xa, ya - ya)
					__lowerCAmelCase							  =			-vector_product(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	) / vector_product(
					    SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)
					__lowerCAmelCase							  =			+vector_product(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	) / vector_product(
					    SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)

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







def       _a (		SCREAMING_SNAKE_CASE_				:							str = "p102_triangles.txt"	):
					__lowerCAmelCase							  =			Path(SCREAMING_SNAKE_CASE_	).parent.joinpath(SCREAMING_SNAKE_CASE_	).read_text(encoding="utf-8"	)

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

					__lowerCAmelCase							  =			0
					__lowerCAmelCase							  =			42

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

					return ret


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




