





'''simple docstring'''






from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def       lowercase_      (		lowercase__						)   ->bool:
						_snake_case:   int  					=		int(number**0.5						)
						return number == sq * sq





def       lowercase_      (		lowercase__				,  lowercase__				,  lowercase__				,  lowercase__				,  lowercase__				,  lowercase__						)   ->tuple[int, int]:
						_snake_case:   int  					=		x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
						_snake_case:   int  					=		x_den * y_den * z_den
						_snake_case:   int  					=		gcd(lowercase__				,  lowercase__						)
						top //= hcf
						bottom //= hcf
						return top, bottom





def       lowercase_      (		lowercase__ = 35						)   ->int:
						_snake_case:   set  					=		set()
						_snake_case:   int
						_snake_case:   Fraction  					=		Fraction(0						)
						_snake_case:   tuple[int, int]

						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
																														_snake_case:   Optional[int]  					=		x_num * y_den + x_den * y_num
																														_snake_case:   Dict  					=		x_den * y_den
																														_snake_case:   Any  					=		gcd(lowercase__				,  lowercase__						)
																														z_num //= hcf
																														z_den //= hcf
																														if 0 < z_num < z_den <= order:
																																				_snake_case:   int  					=		add_three(
																																				    lowercase__				,  lowercase__				,  lowercase__				,  lowercase__				,  lowercase__				,  lowercase__						)
																																				unique_s.add(lowercase__						)

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

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

																														# n=2
																														_snake_case:   str  					=		x_num * x_num * y_num * y_num
																														_snake_case:   int  					=		(
																														    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
																														)
																														if is_sq(lowercase__						) and is_sq(lowercase__						):
																																				_snake_case:   Union[str, Any]  					=		int(sqrt(lowercase__						)						)
																																				_snake_case:   Dict  					=		int(sqrt(lowercase__						)						)
																																				_snake_case:   Tuple  					=		gcd(lowercase__				,  lowercase__						)
																																				z_num //= hcf
																																				z_den //= hcf
																																				if 0 < z_num < z_den <= order:
																																										_snake_case:   List[Any]  					=		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() = }')












'''simple docstring'''






from typing import TYPE_CHECKING

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


A   : Dict             =			{'configuration_speech_encoder_decoder': ['SpeechEncoderDecoderConfig']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : int             =			['SpeechEncoderDecoderModel']

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : Union[str, Any]             =			['FlaxSpeechEncoderDecoderModel']

if TYPE_CHECKING:
		from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
		import sys

		A   : int             =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





