




from __future__ import annotations

from pathlib import Path




def        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_   )							->						int:

    """simple docstring"""


    return pointa[0] * pointa[1] - pointa[1] * pointa[0]




def        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_   )							->						bool:

    """simple docstring"""


    __UpperCamelCase			=    (xa, ya)
    __UpperCamelCase			=    (xa - xa, ya - ya)
    __UpperCamelCase			=    (xa - xa, ya - ya)
    __UpperCamelCase			=    -vector_product(lowercase_       ,  lowercase_   ) / vector_product(
        lowercase_       ,  lowercase_   )
    __UpperCamelCase			=    +vector_product(lowercase_       ,  lowercase_   ) / vector_product(
        lowercase_       ,  lowercase_   )

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




def        __SCREAMING_SNAKE_CASE (	lowercase_ = "p102_triangles.txt"   )							->						int:

    """simple docstring"""


    __UpperCamelCase			=    Path(lowercase_   ).parent.joinpath(lowercase_   ).read_text(encoding='''utf-8'''   )

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

    __UpperCamelCase			=    0
    __UpperCamelCase			=    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							(   lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_):

					# Base Case
					if counter == 0 or capacity == 0:
										return 0

					# If weight of the nth item is more than Knapsack of capacity,
					#   then this item cannot be included in the optimal solution,
					# else return the maximum of two cases:
					#   (1) nth item included
					#   (2) not included
					if weights[counter - 1] > capacity:
										return knapsack(lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
					else:
										a__ 							=	capacity - weights[counter - 1]
										a__ 							=	values[counter - 1] + knapsack(
										    lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
										a__ 							=	knapsack(lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
										return max(lowerCamelCase_			,  lowerCamelCase_)


if __name__ == "__main__":
	import doctest

	doctest.testmod()


