
'''simple docstring'''



from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_						)     ->     bool:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE      =				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"""
   _SCREAMING_SNAKE_CASE      =				x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
   _SCREAMING_SNAKE_CASE      =				x_den * y_den * z_den
   _SCREAMING_SNAKE_CASE      =				gcd(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
   top //= hcf
   bottom //= hcf
   return top, bottom
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_ = 35						)     ->     int:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE      =				set()
   _SCREAMING_SNAKE_CASE      =				42
   _SCREAMING_SNAKE_CASE      =				Fraction(0						)
   _SCREAMING_SNAKE_CASE      =				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
               _SCREAMING_SNAKE_CASE      =				x_num * y_den + x_den * y_num
               _SCREAMING_SNAKE_CASE      =				x_den * y_den
               _SCREAMING_SNAKE_CASE      =				gcd(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
               z_num //= hcf
               z_den //= hcf
               if 0 < z_num < z_den <= order:
                  _SCREAMING_SNAKE_CASE      =				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
               _SCREAMING_SNAKE_CASE      =				(
                   x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
               )
               _SCREAMING_SNAKE_CASE      =				x_den * x_den * y_den * y_den
               if is_sq(SCREAMING_SNAKE_CASE_						) and is_sq(SCREAMING_SNAKE_CASE_						):
                  _SCREAMING_SNAKE_CASE      =				int(sqrt(SCREAMING_SNAKE_CASE_						)						)
                  _SCREAMING_SNAKE_CASE      =				int(sqrt(SCREAMING_SNAKE_CASE_						)						)
                  _SCREAMING_SNAKE_CASE      =				gcd(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
                  z_num //= hcf
                  z_den //= hcf
                  if 0 < z_num < z_den <= order:
                     _SCREAMING_SNAKE_CASE      =				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
               _SCREAMING_SNAKE_CASE      =				x_num * y_num
               _SCREAMING_SNAKE_CASE      =				x_den * y_num + x_num * y_den
               _SCREAMING_SNAKE_CASE      =				gcd(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
               z_num //= hcf
               z_den //= hcf
               if 0 < z_num < z_den <= order:
                  _SCREAMING_SNAKE_CASE      =				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
               _SCREAMING_SNAKE_CASE      =				x_num * x_num * y_num * y_num
               _SCREAMING_SNAKE_CASE      =				(
                   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_						):
                  _SCREAMING_SNAKE_CASE      =				int(sqrt(SCREAMING_SNAKE_CASE_						)						)
                  _SCREAMING_SNAKE_CASE      =				int(sqrt(SCREAMING_SNAKE_CASE_						)						)
                  _SCREAMING_SNAKE_CASE      =				gcd(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
                  z_num //= hcf
                  z_den //= hcf
                  if 0 < z_num < z_den <= order:
                     _SCREAMING_SNAKE_CASE      =				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() = }""")








'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available


UpperCamelCase__      :		int       							=  {"tokenization_herbert": ["HerbertTokenizer"]}

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase__      :		Tuple       							=  ["HerbertTokenizerFast"]


if TYPE_CHECKING:
     from .tokenization_herbert import HerbertTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_herbert_fast import HerbertTokenizerFast

else:
     import sys

     UpperCamelCase__      :		Tuple       							=  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






