
'''simple docstring'''







from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 					UpperCAmelCase_		(__a      :    int ):






   """simple docstring"""

   _a				:	int			=   int(number**0.5 )
   return number == sq * sq





def 					UpperCAmelCase_		(__a      :    int ,	__a      :    int ,	__a      :    int ,	__a      :    int ,	__a      :    int ,	__a      :    int ):






   """simple docstring"""

   _a				:	int			=   x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
   _a				:	int			=   x_den * y_den * z_den
   _a				:	int			=   gcd(__a ,	__a )
   top //= hcf
   bottom //= hcf
   return top, bottom





def 					UpperCAmelCase_		(__a      :    int = 3_5 ):






   """simple docstring"""

   _a				:	set			=   set()
   _a				:	int
   _a				:	Fraction			=   Fraction(0 )
   _a				:	tuple[int, int]

   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				:	Any			=   x_num * y_den + x_den * y_num
               _a				:	int			=   x_den * y_den
               _a				:	List[Any]			=   gcd(__a ,	__a )
               z_num //= hcf
               z_den //= hcf
               if 0 < z_num < z_den <= order:
                  _a				:	Tuple			=   add_three(
                      __a ,	__a ,	__a ,	__a ,	__a ,	__a )
                  unique_s.add(__a )

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

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

               # n=2
               _a				:	Optional[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(__a ) and is_sq(__a ):
                  _a				:	List[Any]			=   int(sqrt(__a ) )
                  _a				:	Union[str, Any]			=   int(sqrt(__a ) )
                  _a				:	Dict			=   gcd(__a ,	__a )
                  z_num //= hcf
                  z_den //= hcf
                  if 0 < z_num < z_den <= order:
                     _a				:	Union[str, Any]			=   add_three(
                         __a ,	__a ,	__a ,	__a ,	__a ,	__a )
                     unique_s.add(__a )

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

   return total.denominator + total.numerator


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





'''simple docstring'''







import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


__lowerCAmelCase         =    logging.getLogger()







@unittest.skip('''Temporarily disable the doc tests.'''	)
@require_torch
@require_tf
@slow
class UpperCAmelCase__	( unittest.TestCase	):





  """simple docstring"""

  def   __lowercase		(		self      :     str							,_a      :     Path							,_a      :     Union[str, None] = None							,_a      :     Union[List[str], None] = None							,_a      :     Union[str, List[str], None] = None							,_a      :     bool = True							,):


     '''simple docstring'''






     _a				:	Optional[int]			=   [file for file in os.listdir(_a       ) if os.path.isfile(os.path.join(_a							,_a       )       )]

     if identifier is not None:
        _a				:	List[str]			=   [file for file in files if identifier in file]

     if n_identifier is not None:
        if isinstance(_a							,_a       ):
           for n_ in n_identifier:
              _a				:	Tuple			=   [file for file in files if n_ not in file]
        else:
           _a				:	Optional[Any]			=   [file for file in files if n_identifier not in file]

     _a				:	List[str]			=   ignore_files or []
     ignore_files.append('__init__.py'       )
     _a				:	Tuple			=   [file for file in files if file not in ignore_files]

     for file in files:
        # Open all files
        print('Testing'							,_a       )

        if only_modules:
           _a				:	Any			=   file.split('.'       )[0]
           try:
              _a				:	List[str]			=   getattr(_a							,_a       )
              _a				:	int			=   doctest.DocTestSuite(_a       )
              _a				:	Any			=   unittest.TextTestRunner().run(_a       )
              self.assertIs(len(result.failures       )							,0       )
           except AttributeError:
              logger.info(F"""{module_identifier} is not a module."""       )
        else:
           _a				:	Union[str, Any]			=   doctest.testfile(str('..' / directory / file       )							,optionflags=doctest.ELLIPSIS       )
           self.assertIs(result.failed							,0       )


  def   __lowercase		(		self      :     Any       ):


     '''simple docstring'''






     _a				:	int			=   Path('src/transformers'       )
     _a				:	List[Any]			=   'modeling'
     _a				:	Optional[Any]			=   [
         'modeling_ctrl.py',
         'modeling_tf_ctrl.py',
     ]
     self.analyze_directory(_a							,identifier=_a							,ignore_files=_a       )


  def   __lowercase		(		self      :     Optional[int]       ):


     '''simple docstring'''






     _a				:	Optional[Any]			=   Path('src/transformers'       )
     _a				:	Optional[Any]			=   'tokenization'
     self.analyze_directory(_a							,identifier=_a       )


  def   __lowercase		(		self      :     List[str]       ):


     '''simple docstring'''






     _a				:	Dict			=   Path('src/transformers'       )
     _a				:	str			=   'configuration'
     self.analyze_directory(_a							,identifier=_a       )


  def   __lowercase		(		self      :     Any       ):


     '''simple docstring'''






     _a				:	Tuple			=   Path('src/transformers'       )
     _a				:	List[Any]			=   ['configuration', 'modeling', 'tokenization']
     self.analyze_directory(_a							,n_identifier=_a       )


  def   __lowercase		(		self      :     Tuple       ):


     '''simple docstring'''






     _a				:	List[Any]			=   Path('docs/source'       )
     _a				:	List[str]			=   ['favicon.ico']
     self.analyze_directory(_a							,ignore_files=_a							,only_modules=_a       )



