



'''simple docstring'''







from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt

def  lowerCamelCase_					(       A_				):
	__lowerCamelCase		       =		int(number**0.5				)
	return number == sq * sq

def  lowerCamelCase_					(       A_    ,				A_    ,				A_    ,				A_    ,				A_    ,				A_				):
	__lowerCamelCase		       =		x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
	__lowerCamelCase		       =		x_den * y_den * z_den
	__lowerCamelCase		       =		gcd(A_    ,				A_				)
	top //= hcf
	bottom //= hcf
	return top, bottom

def  lowerCamelCase_					(       A_ = 35				):
	__lowerCamelCase		       =		set()
	__lowerCamelCase		       =		42
	__lowerCamelCase		       =		Fraction(0				)
	__lowerCamelCase		       =		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
					__lowerCamelCase		       =		x_num * y_den + x_den * y_num
					__lowerCamelCase		       =		x_den * y_den
					__lowerCamelCase		       =		gcd(A_    ,				A_				)
					z_num //= hcf
					z_den //= hcf
					if 0 < z_num < z_den <= order:
						__lowerCamelCase		       =		add_three(
						    A_    ,				A_    ,				A_    ,				A_    ,				A_    ,				A_				)
						unique_s.add(A_				)

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

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

					# n=2
					__lowerCamelCase		       =		x_num * x_num * y_num * y_num
					__lowerCamelCase		       =		(
					    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
					)
					if is_sq(A_				) and is_sq(A_				):
						__lowerCamelCase		       =		int(sqrt(A_				)				)
						__lowerCamelCase		       =		int(sqrt(A_				)				)
						__lowerCamelCase		       =		gcd(A_    ,				A_				)
						z_num //= hcf
						z_den //= hcf
						if 0 < z_num < z_den <= order:
							__lowerCamelCase		       =		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() = }''')









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


UpperCAmelCase__							  =						{
    "configuration_biogpt": ["BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP", "BioGptConfig"],
    "tokenization_biogpt": ["BioGptTokenizer"],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						[
         "BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "BioGptForCausalLM",
         "BioGptForTokenClassification",
         "BioGptForSequenceClassification",
         "BioGptModel",
         "BioGptPreTrainedModel",
     ]


if TYPE_CHECKING:
     from .configuration_biogpt import BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, BioGptConfig
     from .tokenization_biogpt import BioGptTokenizer

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_biogpt import (
              BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
              BioGptForCausalLM,
              BioGptForSequenceClassification,
              BioGptForTokenClassification,
              BioGptModel,
              BioGptPreTrainedModel,
          )


else:
     import sys

     UpperCAmelCase__							  =						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


