

'''simple docstring'''

from __future__ import annotations

from pathlib import Path

def 				__UpperCamelCase							(	lowercase__						:  tuple[int, int],					lowercase__						:  tuple[int, int] ):






     '''simple docstring'''





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

def 				__UpperCamelCase							(	lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int ):






     '''simple docstring'''





     __lowercase					=(xa, ya)
     __lowercase					=(xa - xa, ya - ya)
     __lowercase					=(xa - xa, ya - ya)
     __lowercase					=-vector_product(lowercase__,					lowercase__ ) / vector_product(
         lowercase__,					lowercase__ )
     __lowercase					=+vector_product(lowercase__,					lowercase__ ) / vector_product(
         lowercase__,					lowercase__ )

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

def 				__UpperCamelCase							(	lowercase__						:  str = "p102_triangles.txt" ):






     '''simple docstring'''





     __lowercase					=Path(lowercase__ ).parent.joinpath(lowercase__ ).read_text(encoding='utf-8' )

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

     __lowercase					=0
     __lowercase					=42

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

     return ret


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





'''simple docstring'''

from __future__ import annotations

from pathlib import Path

def 				__UpperCamelCase							(	lowercase__						:  tuple[int, int],					lowercase__						:  tuple[int, int] ):






     '''simple docstring'''





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

def 				__UpperCamelCase							(	lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int,					lowercase__						:  int ):






     '''simple docstring'''





     __lowercase					=(xa, ya)
     __lowercase					=(xa - xa, ya - ya)
     __lowercase					=(xa - xa, ya - ya)
     __lowercase					=-vector_product(lowercase__,					lowercase__ ) / vector_product(
         lowercase__,					lowercase__ )
     __lowercase					=+vector_product(lowercase__,					lowercase__ ) / vector_product(
         lowercase__,					lowercase__ )

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

def 				__UpperCamelCase							(	lowercase__						:  str = "p102_triangles.txt" ):






     '''simple docstring'''





     __lowercase					=Path(lowercase__ ).parent.joinpath(lowercase__ ).read_text(encoding='utf-8' )

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

     __lowercase					=0
     __lowercase					=42

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

     return ret


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


