






from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 	lowerCAmelCase_		(lowercase__						:       int       )		->    bool:


				'''simple docstring'''




				lowerCAmelCase__      			=						int(number**0.5       )
				return number == sq * sq





def 	lowerCAmelCase_		(lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int       )		->    tuple[int, int]:


				'''simple docstring'''




				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(lowercase__     ,					lowercase__       )
				top //= hcf
				bottom //= hcf
				return top, bottom





def 	lowerCAmelCase_		(lowercase__						:       int = 35       )		->    int:


				'''simple docstring'''




				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(lowercase__     ,					lowercase__       )
																				z_num //= hcf
																				z_den //= hcf
																				if 0 < z_num < z_den <= order:
																								lowerCAmelCase__      			=						add_three(
																								    lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__       )
																								unique_s.add(lowercase__       )

																				# 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(lowercase__       ) and is_sq(lowercase__       ):
																								lowerCAmelCase__      			=						int(sqrt(lowercase__       )       )
																								lowerCAmelCase__      			=						int(sqrt(lowercase__       )       )
																								lowerCAmelCase__      			=						gcd(lowercase__     ,					lowercase__       )
																								z_num //= hcf
																								z_den //= hcf
																								if 0 < z_num < z_den <= order:
																												lowerCAmelCase__      			=						add_three(
																												    lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__       )
																												unique_s.add(lowercase__       )

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

																				# 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(lowercase__       ) and is_sq(lowercase__       ):
																								lowerCAmelCase__      			=						int(sqrt(lowercase__       )       )
																								lowerCAmelCase__      			=						int(sqrt(lowercase__       )       )
																								lowerCAmelCase__      			=						gcd(lowercase__     ,					lowercase__       )
																								z_num //= hcf
																								z_den //= hcf
																								if 0 < z_num < z_den <= order:
																												lowerCAmelCase__      			=						add_three(
																												    lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__       )
																												unique_s.add(lowercase__       )

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

				return total.denominator + total.numerator


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













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase			:		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:
			_UpperCAmelCase			:		Dict   				=    [
			    "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

			_UpperCAmelCase			:		Optional[int]   				=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





