



"""simple docstring"""




from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 					__snake_case     (      _UpperCAmelCase    ):
    __a							=    int(number**0.5    )
    return number == sq * sq





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase    ):
    __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(_UpperCAmelCase       ,			_UpperCAmelCase    )
    top //= hcf
    bottom //= hcf
    return top, bottom





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

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

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

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










import unittest

from transformers import DonutProcessor


__snake_case						:List[str]						=					'''naver-clova-ix/donut-base'''

class    _A	(     unittest.TestCase   ):



       def 		_lowerCamelCase      (		self							:					List[str]):


           '''simple docstring'''

           __a							=    DonutProcessor.from_pretrained(__SCREAMING_SNAKE_CASE)





       def 		_lowerCamelCase      (		self							:					Tuple):


           '''simple docstring'''

           __a							=    {
               '''name''': '''John Doe''',
               '''age''': '''99''',
               '''city''': '''Atlanta''',
               '''state''': '''GA''',
               '''zip''': '''30301''',
               '''phone''': '''123-4567''',
               '''nicknames''': [{'''nickname''': '''Johnny'''}, {'''nickname''': '''JD'''}],
           }

           __a							=    (
               '''<s_name>John Doe</s_name><s_age>99</s_age><s_city>Atlanta</s_city>'''
               '''<s_state>GA</s_state><s_zip>30301</s_zip><s_phone>123-4567</s_phone>'''
               '''<s_nicknames><s_nickname>Johnny</s_nickname>'''
               '''<sep/><s_nickname>JD</s_nickname></s_nicknames>'''
           )
           __a							=    self.processor.tokenajson(__SCREAMING_SNAKE_CASE)

           self.assertDictEqual(__SCREAMING_SNAKE_CASE					,		__SCREAMING_SNAKE_CASE)





