




'''simple docstring'''





from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt




def        _SCREAMING_SNAKE_CASE      (		snake_case       )						->				List[str]:
						_UpperCAmelCase      =			int(number**0.5       )
						return number == sq * sq




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case			,     snake_case			,     snake_case			,     snake_case			,     snake_case       )						->				Union[str, Any]:
						_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(lowerCamelCase_			,     lowerCamelCase_       )
						top //= hcf
						bottom //= hcf
						return top, bottom




def        _SCREAMING_SNAKE_CASE      (		snake_case = 3_5       )						->				Tuple:
						_UpperCAmelCase      =			set()
						_UpperCAmelCase      =			4_2
						_UpperCAmelCase      =			Fraction(0       )
						_UpperCAmelCase      =			4_2

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

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

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

																														# 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(lowerCamelCase_       ) and is_sq(lowerCamelCase_       ):
																																				_UpperCAmelCase      =			int(sqrt(lowerCamelCase_       )       )
																																				_UpperCAmelCase      =			int(sqrt(lowerCamelCase_       )       )
																																				_UpperCAmelCase      =			gcd(lowerCamelCase_			,     lowerCamelCase_       )
																																				z_num //= hcf
																																				z_den //= hcf
																																				if 0 < z_num < z_den <= order:
																																										_UpperCAmelCase      =			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() = }')





# flake8: noqa
# Lint as: python3
a													=			[
    "VerificationMode",
    "Version",
    "disable_progress_bar",
    "enable_progress_bar",
    "is_progress_bar_enabled",
    "experimental",
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental