
'''simple docstring'''

from __future__ import annotations







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_       ):
     assert (
         c % greatest_common_divisor(lowerCAmelCase_ ,       lowerCAmelCase_       ) == 0
     )  # greatest_common_divisor(a,b) function implemented below
     ((_UpperCAmelCase)  ,     (_UpperCAmelCase)  ,     (_UpperCAmelCase))					:  Optional[Any]         =    extended_gcd(lowerCAmelCase_ ,       lowerCAmelCase_       )  # extended_gcd(a,b) function implemented below
     _UpperCAmelCase					:  List[Any]         =    c / d
     return (r * x, r * y)







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_ = 2       ):
     ((_UpperCAmelCase)  ,     (_UpperCAmelCase))					:  Optional[int]         =    diophantine(lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_       )  # Initial value
     _UpperCAmelCase					:  Dict         =    greatest_common_divisor(lowerCAmelCase_ ,       lowerCAmelCase_       )
     _UpperCAmelCase					:  str         =    a // d
     _UpperCAmelCase					:  Dict         =    b // d

     for i in range(lowerCAmelCase_       ):
          _UpperCAmelCase					:  Any         =    xa + i * q
          _UpperCAmelCase					:  Optional[int]         =    ya - i * p
          print(lowerCAmelCase_ ,       lowerCAmelCase_       )







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_       ):

     if a < b:
          _UpperCAmelCase  ,     _UpperCAmelCase					:  List[Any]         =    b, a

     while a % b != 0:
          _UpperCAmelCase  ,     _UpperCAmelCase					:  Tuple         =    b, a % b

     return b







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_       ):
     assert a >= 0 and b >= 0

     if b == 0:
          _UpperCAmelCase  ,     _UpperCAmelCase  ,     _UpperCAmelCase					:  List[str]         =    a, 1, 0
     else:
          ((_UpperCAmelCase)  ,     (_UpperCAmelCase)  ,     (_UpperCAmelCase))					:  Union[str, Any]         =    extended_gcd(lowerCAmelCase_ ,       a % b       )
          _UpperCAmelCase					:  str         =    q
          _UpperCAmelCase					:  Optional[Any]         =    p - q * (a // b)

     assert a % d == 0 and b % d == 0
     assert d == a * x + b * y

     return (d, x, y)


if __name__ == "__main__":
   from doctest import testmod

   testmod(name='''diophantine''', verbose=True)
   testmod(name='''diophantine_all_soln''', verbose=True)
   testmod(name='''extended_gcd''', verbose=True)
   testmod(name='''greatest_common_divisor''', verbose=True)






UpperCAmelCase			=    10**8






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE					)->  bool:




      """simple docstring"""

      if n % 10 == 0:
            return False
      snake_case_       =      str(SCREAMING_SNAKE_CASE					)
      return s == s[::-1]






def        __lowerCAmelCase    ()->  int:




      """simple docstring"""

      snake_case_       =      set()
      snake_case_       =      1
      snake_case_       =      5
      while sum_squares < LIMIT:
            snake_case_       =      first_square + 1
            while sum_squares < LIMIT:
                  if is_palindrome(SCREAMING_SNAKE_CASE					):
                        answer.add(SCREAMING_SNAKE_CASE					)
                  last_square += 1
                  sum_squares += last_square**2
            first_square += 1
            snake_case_       =      first_square**2 + (first_square + 1) ** 2

      return sum(SCREAMING_SNAKE_CASE					)


if __name__ == "__main__":
   print(solution())