



'''simple docstring'''


from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt







def 				__lowerCamelCase				(   A__    )       ->	bool:






   """simple docstring"""
   UpperCamelCase					=  int(number**0.5    )
   return number == sq * sq







def 				__lowerCamelCase				(   A__    ,						A__    ,						A__    ,						A__    ,						A__    ,						A__    )       ->	tuple[int, int]:






   """simple docstring"""
   UpperCamelCase					=  x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
   UpperCamelCase					=  x_den * y_den * z_den
   UpperCamelCase					=  gcd(A__    ,						A__    )
   top //= hcf
   bottom //= hcf
   return top, bottom







def 				__lowerCamelCase				(   A__ = 35    )       ->	int:






   """simple docstring"""
   UpperCamelCase					=  set()
   UpperCamelCase					=  42
   UpperCamelCase					=  Fraction(0    )
   UpperCamelCase					=  42

   for x_num in range(1    ,						order + 1    ):
      for x_den in range(x_num + 1    ,						order + 1    ):
         for y_num in range(1    ,						order + 1    ):
            for y_den in range(y_num + 1    ,						order + 1    ):
               # n=1
               UpperCamelCase					=  x_num * y_den + x_den * y_num
               UpperCamelCase					=  x_den * y_den
               UpperCamelCase					=  gcd(A__    ,						A__    )
               z_num //= hcf
               z_den //= hcf
               if 0 < z_num < z_den <= order:
                  UpperCamelCase					=  add_three(
                      A__    ,						A__    ,						A__    ,						A__    ,						A__    ,						A__    )
                  unique_s.add(A__    )

               # n=2
               UpperCamelCase					=  (
                   x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
               )
               UpperCamelCase					=  x_den * x_den * y_den * y_den
               if is_sq(A__    ) and is_sq(A__    ):
                  UpperCamelCase					=  int(sqrt(A__    )    )
                  UpperCamelCase					=  int(sqrt(A__    )    )
                  UpperCamelCase					=  gcd(A__    ,						A__    )
                  z_num //= hcf
                  z_den //= hcf
                  if 0 < z_num < z_den <= order:
                     UpperCamelCase					=  add_three(
                         A__    ,						A__    ,						A__    ,						A__    ,						A__    ,						A__    )
                     unique_s.add(A__    )

                    # n=-1
               UpperCamelCase					=  x_num * y_num
               UpperCamelCase					=  x_den * y_num + x_num * y_den
               UpperCamelCase					=  gcd(A__    ,						A__    )
               z_num //= hcf
               z_den //= hcf
               if 0 < z_num < z_den <= order:
                  UpperCamelCase					=  add_three(
                      A__    ,						A__    ,						A__    ,						A__    ,						A__    ,						A__    )
                  unique_s.add(A__    )

               # n=2
               UpperCamelCase					=  x_num * x_num * y_num * y_num
               UpperCamelCase					=  (
                   x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
               )
               if is_sq(A__    ) and is_sq(A__    ):
                  UpperCamelCase					=  int(sqrt(A__    )    )
                  UpperCamelCase					=  int(sqrt(A__    )    )
                  UpperCamelCase					=  gcd(A__    ,						A__    )
                  z_num //= hcf
                  z_den //= hcf
                  if 0 < z_num < z_den <= order:
                     UpperCamelCase					=  add_three(
                         A__    ,						A__    ,						A__    ,						A__    ,						A__    ,						A__    )
                     unique_s.add(A__    )

   for num, den in unique_s:
      total += Fraction(A__    ,						A__    )

   return total.denominator + total.numerator


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






'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a   :			Optional[int]					  =    {
    """configuration_git""": ["""GIT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GitConfig""", """GitVisionConfig"""],
    """processing_git""": ["""GitProcessor"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a   :			Tuple					  =    [
							    """GIT_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """GitForCausalLM""",
							    """GitModel""",
							    """GitPreTrainedModel""",
							    """GitVisionModel""",
							]

if TYPE_CHECKING:
							from .configuration_git import GIT_PRETRAINED_CONFIG_ARCHIVE_MAP, GitConfig, GitVisionConfig
							from .processing_git import GitProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_git import (
														    GIT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    GitForCausalLM,
														    GitModel,
														    GitPreTrainedModel,
														    GitVisionModel,
														)

else:
							import sys

							a   :			Tuple					  =    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

