





from ..utils import DummyObject, requires_backends







class      lowerCamelCase(						metaclass=__snake_case	):
     '''simple docstring'''


     __magic_name__   =			['onnx']




     def __init__(    self				,     *snake_case_				,     **snake_case_							):
         requires_backends(self				,     ['onnx']							)




     @classmethod
     def        lowerCAmelCase__		(    cls				,     *snake_case_				,     **snake_case_							):
         requires_backends(cls				,     ['onnx']							)




     @classmethod
     def        lowerCAmelCase__		(    cls				,     *snake_case_				,     **snake_case_							):
         requires_backends(cls				,     ['onnx']							)












from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE				)							-> bool:




    """simple docstring"""




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





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)							-> tuple[int, int]:




    """simple docstring"""




    _A     =							x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
    _A     =							x_den * y_den * z_den
    _A     =							gcd(_SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
    top //= hcf
    bottom //= hcf
    return top, bottom





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE = 35				)							-> int:




    """simple docstring"""




    _A     =							set()
    _A     =							42
    _A     =							Fraction(0				)
    _A     =							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     =							x_num * y_den + x_den * y_num
                    _A     =							x_den * y_den
                    _A     =							gcd(_SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                    z_num //= hcf
                    z_den //= hcf
                    if 0 < z_num < z_den <= order:
                        _A     =							add_three(
                            _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                        unique_s.add(_SCREAMING_SNAKE_CASE				)

                    # n=2
                    _A     =							(
                        x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
                    )
                    _A     =							x_den * x_den * y_den * y_den
                    if is_sq(_SCREAMING_SNAKE_CASE				) and is_sq(_SCREAMING_SNAKE_CASE				):
                        _A     =							int(sqrt(_SCREAMING_SNAKE_CASE				)				)
                        _A     =							int(sqrt(_SCREAMING_SNAKE_CASE				)				)
                        _A     =							gcd(_SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                        z_num //= hcf
                        z_den //= hcf
                        if 0 < z_num < z_den <= order:
                            _A     =							add_three(
                                _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                            unique_s.add(_SCREAMING_SNAKE_CASE				)

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

                    # n=2
                    _A     =							x_num * x_num * y_num * y_num
                    _A     =							(
                        x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
                    )
                    if is_sq(_SCREAMING_SNAKE_CASE				) and is_sq(_SCREAMING_SNAKE_CASE				):
                        _A     =							int(sqrt(_SCREAMING_SNAKE_CASE				)				)
                        _A     =							int(sqrt(_SCREAMING_SNAKE_CASE				)				)
                        _A     =							gcd(_SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                        z_num //= hcf
                        z_den //= hcf
                        if 0 < z_num < z_den <= order:
                            _A     =							add_three(
                                _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)
                            unique_s.add(_SCREAMING_SNAKE_CASE				)

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

    return total.denominator + total.numerator


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





