


"""simple docstring"""

import sys
import turtle


def lowerCAmelCase_   (					UpperCamelCase__						:			tuple[float, float]					, UpperCamelCase__						:			tuple[float, float]			):






 """simple docstring"""







 return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2


def lowerCAmelCase_   (					UpperCamelCase__						:			tuple[float, float]					, UpperCamelCase__						:			tuple[float, float]					, UpperCamelCase__						:			tuple[float, float]					, UpperCamelCase__						:			int					, ):






 """simple docstring"""







 my_pen.up()
 my_pen.goto(vertexa[0]					, vertexa[1]			)
 my_pen.down()
 my_pen.goto(vertexa[0]					, vertexa[1]			)
 my_pen.goto(vertexa[0]					, vertexa[1]			)
 my_pen.goto(vertexa[0]					, vertexa[1]			)

 if depth == 0:
  return

 triangle(UpperCamelCase__					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, depth - 1			)
 triangle(UpperCamelCase__					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, depth - 1			)
 triangle(UpperCamelCase__					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, get_mid(UpperCamelCase__					, UpperCamelCase__			)					, depth - 1			)


if __name__ == "__main__":
       if len(sys.argv) != 2:
              raise ValueError(
                  "Correct format for using this script: "
                  "python fractals.py <int:depth_for_fractal>"
              )
       UpperCAmelCase__					=turtle.Turtle()
       my_pen.ht()
       my_pen.speed(5)
       my_pen.pencolor("red")

       UpperCAmelCase__					=[(-175, -125), (0, 175), (175, -125)]  # vertices of triangle
       triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))




"""simple docstring"""

def lowerCAmelCase_   (					UpperCamelCase__						:			Union[str, Any]					, UpperCamelCase__						:			Union[str, Any]					, UpperCamelCase__						:			int			):






 """simple docstring"""







 if n == 0:
  return 1

 elif n % 2 == 1:
  return (binary_exponentiation(UpperCamelCase__					, n - 1					, UpperCamelCase__			) * a) % mod

 else:
  __lowercase						=						binary_exponentiation(UpperCamelCase__					, n / 2					, UpperCamelCase__			)
  return (b * b) % mod


# a prime number
UpperCAmelCase__					=701

UpperCAmelCase__					=10_0000_0000
UpperCAmelCase__					=10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)

print((a / b) % p == (a * b ** (p - 2)) % p)
