'''simple docstring'''






import math
from itertools import permutations





def    _SCREAMING_SNAKE_CASE		(			__snake_case       : int							):

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





def    _SCREAMING_SNAKE_CASE		(			__snake_case       : int      ,		__snake_case       : list							):
     _A		,					_A								=     0, len(__lowerCamelCase							) - 1
     while left <= right:
          _A								=     (left + right) // 2
          if prime_list[middle] == target:
               return True
          elif prime_list[middle] < target:
               _A								=     middle + 1
          else:
               _A								=     middle - 1

     return False





def    _SCREAMING_SNAKE_CASE		(			):
     _A								=     [n for n in range(1_0_0_1      ,		1_0_0_0_0      ,		2							) if is_prime(__lowerCamelCase							)]
     _A								=     []

     for number in prime_list:
          _A								=     []

          for prime_member in permutations(list(str(__lowerCamelCase							)							)							):
               _A								=     int(''.join(__lowerCamelCase							)							)

               if prime % 2 == 0:
                    continue

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

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

     _A								=     []
     for candidate in candidates:
          _A								=     len(__lowerCamelCase							)
          _A								=     False

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

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

     _A								=     set()
     for seq in passed:
          answer.add(''.join([str(__lowerCamelCase							) for i in seq]							)							)

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


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




'''simple docstring'''






from sklearn.neural_network import MLPClassifier

_UpperCAmelCase						:    str     					=					[[0.0, 0.0], [1.0, 1.0], [1.0, 0.0], [0.0, 1.0]]
_UpperCAmelCase						:    Any     					=					[0, 1, 0, 0]


_UpperCAmelCase						:    List[Any]     					=					MLPClassifier(
    solver='''lbfgs''', alpha=1E-5, hidden_layer_sizes=(5, 2), random_state=1
)

clf.fit(X, y)


_UpperCAmelCase						:    Optional[Any]     					=					[[0.0, 0.0], [0.0, 1.0], [1.0, 1.0]]
_UpperCAmelCase						:    Tuple     					=					clf.predict(test)





def    _SCREAMING_SNAKE_CASE		(			__snake_case       : Optional[Any]							):
     return list(__snake_case							)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



