




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() = }""")










import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


__UpperCAmelCase			:			Optional[Any]			      =					2 << 20  # 2mb
__UpperCAmelCase			:			List[Any]			      =					get_logger(__name__)



class  UpperCAmelCase_						(				_a):
       '''simple docstring'''






       def 			_lowercase (  self    ):




              """simple docstring"""




              UpperCamelCase     :						Optional[Any] 						=		self._options.get_all_options().get('''runner'''    )
              return runner in [None, "DirectRunner", "PortableRunner"]




def   a						(				SCREAMING_SNAKE_CASE_   :		str				,      SCREAMING_SNAKE_CASE_   :		int				,      SCREAMING_SNAKE_CASE_   :		Optional[Any]=False							):






       """simple docstring"""





       UpperCamelCase     :						int 						=		FileSystems
       if fs.exists(SCREAMING_SNAKE_CASE_							):
              if force_upload:
                     logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""							)
              else:
                     logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""							)
                     return
       with fs.create(SCREAMING_SNAKE_CASE_							) as remote_file:
              with open(SCREAMING_SNAKE_CASE_				,      '''rb'''							) as local_file:
                     UpperCamelCase     :						List[str] 						=		local_file.read(SCREAMING_SNAKE_CASE_							)
                     while chunk:
                            remote_file.write(SCREAMING_SNAKE_CASE_							)
                            UpperCamelCase     :						Any 						=		local_file.read(SCREAMING_SNAKE_CASE_							)


def   a						(				SCREAMING_SNAKE_CASE_   :		str				,      SCREAMING_SNAKE_CASE_   :		Optional[Any]				,      SCREAMING_SNAKE_CASE_   :		List[str]=False							):






       """simple docstring"""





       UpperCamelCase     :						List[Any] 						=		FileSystems
       if os.path.exists(SCREAMING_SNAKE_CASE_							):
              if force_download:
                     logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""							)
              else:
                     logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""							)
                     return
       with fs.open(SCREAMING_SNAKE_CASE_							) as remote_file:
              with open(SCREAMING_SNAKE_CASE_				,      '''wb'''							) as local_file:
                     UpperCamelCase     :						List[str] 						=		remote_file.read(SCREAMING_SNAKE_CASE_							)
                     while chunk:
                            local_file.write(SCREAMING_SNAKE_CASE_							)
                            UpperCamelCase     :						str 						=		remote_file.read(SCREAMING_SNAKE_CASE_							)

