






"""simple docstring"""



import math
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  Union[str, Any]   ):





  '''simple docstring'''





  if n <= 0:
    raise ValueError('Only positive integers have prime factors'   )
  lowercase							   =	[]
  while n % 2 == 0:
    pf.append(2   )
    lowercase							   =	int(n / 2   )
  for i in range(3		, int(math.sqrt(__UpperCamelCase   )   ) + 1		, 2   ):
    while n % i == 0:
      pf.append(__UpperCamelCase   )
      lowercase							   =	int(n / i   )
  if n > 2:
    pf.append(__UpperCamelCase   )
  return pf
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  Any   ):





  '''simple docstring'''





  if n <= 0:
    raise ValueError('Only positive numbers are accepted'   )
  lowercase							   =	1
  lowercase							   =	1
  while n % 2 == 0:
    temp += 1
    lowercase							   =	int(n / 2   )
  div *= temp
  for i in range(3		, int(math.sqrt(__UpperCamelCase   )   ) + 1		, 2   ):
    lowercase							   =	1
    while n % i == 0:
      temp += 1
      lowercase							   =	int(n / i   )
    div *= temp
  if n > 1:
    div *= 2
  return div
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  Any   ):





  '''simple docstring'''





  if n <= 0:
    raise ValueError('Only positive numbers are accepted'   )
  lowercase							   =	1
  lowercase							   =	1
  while n % 2 == 0:
    temp += 1
    lowercase							   =	int(n / 2   )
  if temp > 1:
    s *= (2**temp - 1) / (2 - 1)
  for i in range(3		, int(math.sqrt(__UpperCamelCase   )   ) + 1		, 2   ):
    lowercase							   =	1
    while n % i == 0:
      temp += 1
      lowercase							   =	int(n / i   )
    if temp > 1:
      s *= (i**temp - 1) / (i - 1)
  return int(__UpperCamelCase   )
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  Any   ):





  '''simple docstring'''





  lowercase							   =	n
  for x in set(prime_factors(__UpperCamelCase   )   ):
    s *= (x - 1) / x
  return int(__UpperCamelCase   )


if __name__ == "__main__":
    import doctest

    doctest.testmod()










"""simple docstring"""



_UpperCamelCase		:  str						=		1_0**8
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int   ):





  '''simple docstring'''





  if n % 10 == 0:
    return False
  lowercase							   =	str(__snake_case   )
  return s == s[::-1]
def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





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

  return sum(__snake_case   )


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


