

'''simple docstring'''
import math
from itertools import permutations







def       _A	(			snake_case  )    ->			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       _A	(			snake_case	,							snake_case  )    ->			bool:
   _lowercase    :   Dict      =     0, len(snake_case  ) - 1
   while left <= right:
      _lowercase    :   Union[str, Any]      =     (left + right) // 2
      if prime_list[middle] == target:
         return True
      elif prime_list[middle] < target:
         _lowercase    :   int      =     middle + 1
      else:
         _lowercase    :   List[Any]      =     middle - 1

   return False







def       _A	(			)    ->			Optional[Any]:
   _lowercase    :   int      =     [n for n in range(10_01	,							1_00_00	,							2  ) if is_prime(snake_case  )]
   _lowercase    :   Union[str, Any]      =     []

   for number in prime_list:
      _lowercase    :   Optional[Any]      =     []

      for prime_member in permutations(list(str(snake_case  )  )  ):
         _lowercase    :   Tuple      =     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  )

   _lowercase    :   Optional[int]      =     []
   for candidate in candidates:
      _lowercase    :   List[Any]      =     len(snake_case  )
      _lowercase    :   Any      =     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]]  )  )
                  _lowercase    :   Optional[Any]      =     True

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

   _lowercase    :   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())









'''simple docstring'''
def       _A	(			snake_case  )    ->			int:

   # validate:
   if not isinstance(snake_case	,							snake_case  ) or not all(
       isinstance(snake_case	,							snake_case  ) and item >= 0 for item in citations  ):
      raise ValueError("The citations should be a list of non negative integers."  )

   citations.sort()
   _lowercase    :   Tuple      =     len(snake_case  )

   for i in range(snake_case  ):
      if citations[len_citations - 1 - i] <= i:
         return i

   return len_citations


if __name__ == "__main__":
    import doctest

    doctest.testmod()






