





import math
from itertools import permutations




def 			__snake_case						(      __A    )		->				str:






   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(UpperCamelCase__    ) + 1    ) ,6    ):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True




def 			__snake_case						(      __A ,__A    )		->				str:
   lowercase  ,					lowercase    :			Any  =       0, len(UpperCamelCase__    ) - 1
   while left <= right:
      lowercase    :			Any  =       (left + right) // 2
      if prime_list[middle] == target:
         return True
      elif prime_list[middle] < target:
         lowercase    :			Tuple  =       middle + 1
      else:
         lowercase    :			List[Any]  =       middle - 1

   return False




def 			__snake_case						(      )		->				List[str]:
   lowercase    :			int  =       [n for n in range(1001 ,10000 ,2    ) if is_prime(UpperCamelCase__    )]
   lowercase    :			Optional[Any]  =       []

   for number in prime_list:
      lowercase    :			int  =       []

      for prime_member in permutations(list(str(UpperCamelCase__    )    )    ):
         lowercase    :			Optional[int]  =       int("""""".join(UpperCamelCase__    )    )

         if prime % 2 == 0:
            continue

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

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

   lowercase    :			Optional[Any]  =       []
   for candidate in candidates:
      lowercase    :			Tuple  =       len(UpperCamelCase__    )
      lowercase    :			Union[str, Any]  =       False

      for i in range(UpperCamelCase__    ):
         for j in range(i + 1 ,UpperCamelCase__    ):
            for k in range(j + 1 ,UpperCamelCase__    ):
               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    :			Any  =       True

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

   lowercase    :			int  =       set()
   for seq in passed:
      answer.add("""""".join([str(UpperCamelCase__    ) for i in seq]    )    )

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


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









"""simple docstring"""
import math




def 			__snake_case						(      __A    )		->				float:
   lowercase    :			List[Any]  =       math.log(2 ,10    ) * number
   lowercase    :			Tuple  =       round((log_number - int(__A    )) ,15    )

   return difference




def 			__snake_case						(      __A = 678910    )		->				int:
   lowercase    :			Any  =       90
   lowercase    :			Optional[Any]  =       0

   lowercase    :			List[str]  =       math.log(1.23 ,10    )
   lowercase    :			str  =       math.log(1.24 ,10    )
   lowercase    :			str  =       0

   while position < number:
      lowercase    :			Optional[Any]  =       log_difference(__A    )

      if difference >= upper_limit:
         power_iterator += 93

      elif difference < lower_limit:
         power_iterator += 196

      else:
         lowercase    :			List[Any]  =       power_iterator
         power_iterator += 196
         position += 1

   return previous_power


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   print(F'{solution() = }')


