



from __future__ import annotations

from pathlib import Path



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



def 				_lowerCAmelCase      (_lowerCAmelCase				,		_lowerCAmelCase				,		_lowerCAmelCase				,		_lowerCAmelCase				,		_lowerCAmelCase				,		_lowerCAmelCase):
					UpperCamelCase_											=				(xa, ya)
					UpperCamelCase_											=				(xa - xa, ya - ya)
					UpperCamelCase_											=				(xa - xa, ya - ya)
					UpperCamelCase_											=				-vector_product(_lowerCAmelCase				,		_lowerCAmelCase) / vector_product(
					    _lowerCAmelCase				,		_lowerCAmelCase)
					UpperCamelCase_											=				+vector_product(_lowerCAmelCase				,		_lowerCAmelCase) / vector_product(
					    _lowerCAmelCase				,		_lowerCAmelCase)

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



def 				_lowerCAmelCase      (_lowerCAmelCase = "p102_triangles.txt"):
					UpperCamelCase_											=				Path(_lowerCAmelCase).parent.joinpath(_lowerCAmelCase).read_text(encoding="utf-8")

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

					UpperCamelCase_											=				0
					UpperCamelCase_											=				42

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

					return ret


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





from __future__ import annotations



def 				_lowerCAmelCase      (_lowerCAmelCase):
					UpperCamelCase_											=				{1}
					UpperCamelCase_											=				[1]
					for _ in range(2				,		depth + 1):
										UpperCamelCase_											=				[*previous_coefficients, 0]
										UpperCamelCase_											=				[0, *previous_coefficients]
										UpperCamelCase_											=				[]
										for x, y in zip(_lowerCAmelCase				,		_lowerCAmelCase):
															coefficients.add(x + y)
															previous_coefficients.append(x + y)
					return coefficients



def 				_lowerCAmelCase      (_lowerCAmelCase):
					UpperCamelCase_											=				set()
					for number in unique_coefficients:
										UpperCamelCase_											=				2
										UpperCamelCase_											=				number
										while divisor**2 <= copy_number:
															UpperCamelCase_											=				0
															while copy_number % divisor == 0:
																				copy_number //= divisor
																				multiplicity += 1
															if multiplicity >= 2:
																				non_squarefrees.add(_lowerCAmelCase)
																				break
															divisor += 1

					return unique_coefficients.difference(_lowerCAmelCase)



def 				_lowerCAmelCase      (_lowerCAmelCase = 51):
					UpperCamelCase_											=				get_pascal_triangle_unique_coefficients(_lowerCAmelCase)
					UpperCamelCase_											=				get_squarefrees(_lowerCAmelCase)
					return sum(_lowerCAmelCase)


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