




from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt

def      A      (      _SCREAMING_SNAKE_CASE    )	-> bool:
       lowerCamelCase   :      int			 =					int(number**0.5    )
       return number == sq * sq

def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )	-> tuple[int, int]:
       lowerCamelCase   :      int			 =					x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
       lowerCamelCase   :      int			 =					x_den * y_den * z_den
       lowerCamelCase   :      int			 =					gcd(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
       top //= hcf
       bottom //= hcf
       return top, bottom

def      A      (      _SCREAMING_SNAKE_CASE = 35    )	-> int:
       lowerCamelCase   :      set			 =					set()
       lowerCamelCase   :      int
       lowerCamelCase   :      Fraction			 =					Fraction(0    )
       lowerCamelCase   :      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
                                   lowerCamelCase   :      Dict			 =					x_num * y_den + x_den * y_num
                                   lowerCamelCase   :      Any			 =					x_den * y_den
                                   lowerCamelCase   :      int			 =					gcd(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
                                   z_num //= hcf
                                   z_den //= hcf
                                   if 0 < z_num < z_den <= order:
                                          lowerCamelCase   :      Tuple			 =					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
                                   lowerCamelCase   :      Dict			 =					(
                                       x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
                                   )
                                   lowerCamelCase   :      Any			 =					x_den * x_den * y_den * y_den
                                   if is_sq(_SCREAMING_SNAKE_CASE    ) and is_sq(_SCREAMING_SNAKE_CASE    ):
                                          lowerCamelCase   :      List[str]			 =					int(sqrt(_SCREAMING_SNAKE_CASE    )    )
                                          lowerCamelCase   :      Tuple			 =					int(sqrt(_SCREAMING_SNAKE_CASE    )    )
                                          lowerCamelCase   :      int			 =					gcd(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
                                          z_num //= hcf
                                          z_den //= hcf
                                          if 0 < z_num < z_den <= order:
                                                 lowerCamelCase   :      Optional[Any]			 =					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
                                   lowerCamelCase   :      int			 =					x_num * y_num
                                   lowerCamelCase   :      int			 =					x_den * y_num + x_num * y_den
                                   lowerCamelCase   :      int			 =					gcd(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
                                   z_num //= hcf
                                   z_den //= hcf
                                   if 0 < z_num < z_den <= order:
                                          lowerCamelCase   :      Union[str, Any]			 =					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
                                   lowerCamelCase   :      str			 =					x_num * x_num * y_num * y_num
                                   lowerCamelCase   :      List[str]			 =					(
                                       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    ):
                                          lowerCamelCase   :      str			 =					int(sqrt(_SCREAMING_SNAKE_CASE    )    )
                                          lowerCamelCase   :      List[Any]			 =					int(sqrt(_SCREAMING_SNAKE_CASE    )    )
                                          lowerCamelCase   :      Any			 =					gcd(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
                                          z_num //= hcf
                                          z_den //= hcf
                                          if 0 < z_num < z_den <= order:
                                                 lowerCamelCase   :      Optional[int]			 =					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() = }''')












import random

from .binary_exp_mod import bin_exp_mod

def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE=1000    )	-> List[str]:
       if n < 2:
              return False

       if n % 2 == 0:
              return n == 2

       # this means n is odd
       lowerCamelCase   :      List[Any]			 =					n - 1
       lowerCamelCase   :      Dict			 =					0
       while d % 2 == 0:
              d /= 2
              exp += 1

       # n - 1=d*(2**exp)
       lowerCamelCase   :      Optional[Any]			 =					0
       while count < prec:
              lowerCamelCase   :      str			 =					random.randint(2 ,n - 1    )
              lowerCamelCase   :      Dict			 =					bin_exp_mod(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
              if b != 1:
                     lowerCamelCase   :      str			 =					True
                     for _ in range(_SCREAMING_SNAKE_CASE    ):
                            if b == n - 1:
                                   lowerCamelCase   :      Tuple			 =					False
                                   break
                            lowerCamelCase   :      int			 =					b * b
                            b %= n
                     if flag:
                            return False
                     count += 1
       return True


if __name__ == "__main__":
       SCREAMING_SNAKE_CASE__       :      Optional[int]  =   abs(int(input('Enter bound : ').strip()))
       print('Here\'s the list of primes:')
       print(', '.join(str(i) for i in range(n + 1) if is_prime_big(i)))






