
'''simple docstring'''

import math
from itertools import permutations



def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	Any							)       ->	bool:

 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5   ,     int(math.sqrt(snake_case_							) + 1							)   ,     6							):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True



def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	List[Any]   ,     snake_case_				:	List[str]							)       ->	bool:
 SCREAMING_SNAKE_CASE  :  str								=		0, len(snake_case_							) - 1
 while left <= right:
  SCREAMING_SNAKE_CASE  :  Dict								=		(left + right) // 2
  if prime_list[middle] == target:
   return True
  elif prime_list[middle] < target:
   SCREAMING_SNAKE_CASE  :  Tuple								=		middle + 1
  else:
   SCREAMING_SNAKE_CASE  :  Union[str, Any]								=		middle - 1

 return False



def        SCREAMING_SNAKE_CASE_  (	)       ->	Any:
 SCREAMING_SNAKE_CASE  :  Tuple								=		[n for n in range(1001   ,     1_0000   ,     2							) if is_prime(snake_case_							)]
 SCREAMING_SNAKE_CASE  :  List[str]								=		[]

 for number in prime_list:
  SCREAMING_SNAKE_CASE  :  List[str]								=		[]

  for prime_member in permutations(list(str(snake_case_							)							)							):
   SCREAMING_SNAKE_CASE  :  Dict								=		int(''.join(snake_case_							)							)

   if prime % 2 == 0:
    continue

   if search(snake_case_   ,     snake_case_							):
    tmp_numbers.append(snake_case_							)

  tmp_numbers.sort()
  if len(snake_case_							) >= 3:
   candidates.append(snake_case_							)

 SCREAMING_SNAKE_CASE  :  Optional[Any]								=		[]
 for candidate in candidates:
  SCREAMING_SNAKE_CASE  :  Optional[Any]								=		len(snake_case_							)
  SCREAMING_SNAKE_CASE  :  List[str]								=		False

  for i in range(snake_case_							):
   for j in range(i + 1   ,     snake_case_							):
    for k in range(j + 1   ,     snake_case_							):
     if (
         abs(candidate[i] - candidate[j]							)
         == abs(candidate[j] - candidate[k]							)
         and len({candidate[i], candidate[j], candidate[k]}							) == 3
     ):
      passed.append(
          sorted([candidate[i], candidate[j], candidate[k]]							)							)
      SCREAMING_SNAKE_CASE  :  Tuple								=		True

     if found:
      break
    if found:
     break
   if found:
    break

 SCREAMING_SNAKE_CASE  :  Union[str, Any]								=		set()
 for seq in passed:
  answer.add(''.join([str(snake_case_							) for i in seq]							)							)

 return max(int(snake_case_							) for x in answer							)


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




import math as m






def     lowerCamelCase__				(   a						,						a						,						a=0.001 ) ->  Optional[int]:
   return (f(a + h ) - f(a - h )) / (2 * h)






def     lowerCamelCase__				(   a						,						a=0						,						a=1_00						,						a=0.0001						,						a=1E-6						,						a=False ) ->  List[Any]:
   _A:    Optional[Any]						     =			xa  # set the initial guess
   _A:    Dict						     =			[a]
   _A:    Tuple						     =			abs(f(a ) )
   _A:    Tuple						     =			lambda a : calc_derivative(a						,						a						,						h=a )  # noqa: E731  Derivative of f(x)
   for _ in range(a ):
      if fa(a ) == 0:
         raise ValueError('''No converging solution found''' )
      _A:    Any						     =			a - f(a ) / fa(a )  # Calculate the next estimate
      if logsteps:
         steps.append(a )
      if error < maxerror:
         break
   else:
      raise ValueError('''Iteration limit reached, no converging solution found''' )
   if logsteps:
      # If logstep is true, then log intermediate steps
      return a, error, steps
   return a, error


if __name__ == "__main__":
   from matplotlib import pyplot as plt

   UpperCAmelCase__						:	Optional[Any]	     = lambda x: m.tanh(x) ** 2 - m.exp(3 * x)  # noqa: E731
   UpperCAmelCase__     ,UpperCAmelCase__     ,UpperCAmelCase__						:	str	     = newton_raphson(
       f, xa=10, maxiter=1000, step=1E-6, logsteps=True
   )
   plt.plot([abs(f(x)) for x in steps])
   plt.xlabel('step')
   plt.ylabel('error')
   plt.show()
   print(F"""solution = {{{solution:f}}}, error = {{{error:f}}}""")



