






'''simple docstring'''







from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase   )   -> Union[str, Any]:
							lowerCamelCase__      :			Dict 						= int(number**0.5   )
							return number == sq * sq





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase   )   -> Tuple:
							lowerCamelCase__      :			str 						= x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
							lowerCamelCase__      :			Optional[Any] 						= x_den * y_den * z_den
							lowerCamelCase__      :			Tuple 						= gcd(lowerCamelCase_       ,    lowerCamelCase_   )
							top //= hcf
							bottom //= hcf
							return top, bottom





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase = 35   )   -> Optional[Any]:
							lowerCamelCase__      :			List[Any] 						= set()
							lowerCamelCase__      :			Tuple 						= 42
							lowerCamelCase__      :			List[str] 						= Fraction(0   )
							lowerCamelCase__      :			Optional[Any] 						= 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__      :			Dict 						= x_num * y_den + x_den * y_num
																																			lowerCamelCase__      :			Tuple 						= x_den * y_den
																																			lowerCamelCase__      :			str 						= gcd(lowerCamelCase_       ,    lowerCamelCase_   )
																																			z_num //= hcf
																																			z_den //= hcf
																																			if 0 < z_num < z_den <= order:
																																										lowerCamelCase__      :			Optional[int] 						= add_three(
																																										    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_   )
																																										unique_s.add(lowerCamelCase_   )

																																			# n=2
																																			lowerCamelCase__      :			Tuple 						= (
																																			    x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
																																			)
																																			lowerCamelCase__      :			Any 						= x_den * x_den * y_den * y_den
																																			if is_sq(lowerCamelCase_   ) and is_sq(lowerCamelCase_   ):
																																										lowerCamelCase__      :			Tuple 						= int(sqrt(lowerCamelCase_   )   )
																																										lowerCamelCase__      :			Optional[int] 						= int(sqrt(lowerCamelCase_   )   )
																																										lowerCamelCase__      :			Any 						= gcd(lowerCamelCase_       ,    lowerCamelCase_   )
																																										z_num //= hcf
																																										z_den //= hcf
																																										if 0 < z_num < z_den <= order:
																																																	lowerCamelCase__      :			Any 						= add_three(
																																																	    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_   )
																																																	unique_s.add(lowerCamelCase_   )

                    # n=-1
																																			lowerCamelCase__      :			int 						= x_num * y_num
																																			lowerCamelCase__      :			Any 						= x_den * y_num + x_num * y_den
																																			lowerCamelCase__      :			Any 						= gcd(lowerCamelCase_       ,    lowerCamelCase_   )
																																			z_num //= hcf
																																			z_den //= hcf
																																			if 0 < z_num < z_den <= order:
																																										lowerCamelCase__      :			List[str] 						= add_three(
																																										    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_   )
																																										unique_s.add(lowerCamelCase_   )

																																			# n=2
																																			lowerCamelCase__      :			Optional[int] 						= x_num * x_num * y_num * y_num
																																			lowerCamelCase__      :			int 						= (
																																			    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
																																			)
																																			if is_sq(lowerCamelCase_   ) and is_sq(lowerCamelCase_   ):
																																										lowerCamelCase__      :			List[str] 						= int(sqrt(lowerCamelCase_   )   )
																																										lowerCamelCase__      :			Optional[Any] 						= int(sqrt(lowerCamelCase_   )   )
																																										lowerCamelCase__      :			Tuple 						= gcd(lowerCamelCase_       ,    lowerCamelCase_   )
																																										z_num //= hcf
																																										z_den //= hcf
																																										if 0 < z_num < z_den <= order:
																																																	lowerCamelCase__      :			int 						= add_three(
																																																	    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_       ,    lowerCamelCase_   )
																																																	unique_s.add(lowerCamelCase_   )

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

							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			:    Dict					  ={
    '''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			:    Union[str, Any]					  =[
			    '''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			:    Dict					  =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

