






from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt



def  a__ (__lowercase							:int   )		-> str:
				_A	:				Any   =      int(number**0.5   )
				return number == sq * sq



def  a__ (__lowercase							:int					,  __lowercase							:int					,  __lowercase							:int					,  __lowercase							:int					,  __lowercase							:int					,  __lowercase							:int   )		-> List[Any]:
				_A	:				List[str]   =      x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
				_A	:				Tuple   =      x_den * y_den * z_den
				_A	:				Tuple   =      gcd(_UpperCamelCase					,  _UpperCamelCase   )
				top //= hcf
				bottom //= hcf
				return top, bottom



def  a__ (__lowercase							:int = 35   )		-> Dict:
				_A	:				Dict   =      set()
				_A	:				Dict   =      42
				_A	:				Tuple   =      Fraction(0   )
				_A	:				int   =      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
																				_A	:				Tuple   =      x_num * y_den + x_den * y_num
																				_A	:				Union[str, Any]   =      x_den * y_den
																				_A	:				Dict   =      gcd(_UpperCamelCase					,  _UpperCamelCase   )
																				z_num //= hcf
																				z_den //= hcf
																				if 0 < z_num < z_den <= order:
																								_A	:				Tuple   =      add_three(
																								    _UpperCamelCase					,  _UpperCamelCase					,  _UpperCamelCase					,  _UpperCamelCase					,  _UpperCamelCase					,  _UpperCamelCase   )
																								unique_s.add(_UpperCamelCase   )

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

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

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

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

				return total.denominator + total.numerator


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








a_								=       {
    0: """0""",
    1: """1""",
    2: """2""",
    3: """3""",
    4: """4""",
    5: """5""",
    6: """6""",
    7: """7""",
    8: """8""",
    9: """9""",
    10: """a""",
    11: """b""",
    12: """c""",
    13: """d""",
    14: """e""",
    15: """f""",
}





def 		a__      (		_UpperCamelCase      :			float				):
   assert type(_UpperCamelCase				) in (int, float) and decimal == int(_UpperCamelCase				)
   __lowerCamelCase    				=     int(_UpperCamelCase				)
   __lowerCamelCase    				=     ''''''
   __lowerCamelCase    				=     False
   if decimal < 0:
      __lowerCamelCase    				=     True
      decimal *= -1
   while decimal > 0:
      __lowerCamelCase				,__lowerCamelCase    				=     divmod(_UpperCamelCase			,16				)
      __lowerCamelCase    				=     values[remainder] + hexadecimal
   __lowerCamelCase    				=     '''0x''' + hexadecimal
   if negative:
      __lowerCamelCase    				=     '''-''' + hexadecimal
   return hexadecimal


if __name__ == "__main__":
  import doctest

  doctest.testmod()






