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


def   lowercase_	(   lowerCAmelCase__	:  int ):

			"""simple docstring"""





			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   lowercase_	(   lowerCAmelCase__	:  int			,							lowerCAmelCase__	:  list ):

			"""simple docstring"""





			__UpperCAmelCase   :      Dict										=     0, len(lowerCAmelCase__ ) - 1
			while left <= right:
						__UpperCAmelCase   :      Dict										=     (left + right) // 2
						if prime_list[middle] == target:
									return True
						elif prime_list[middle] < target:
									__UpperCAmelCase   :      Union[str, Any]										=     middle + 1
						else:
									__UpperCAmelCase   :      Tuple										=     middle - 1

			return False


def   lowercase_	(   ):

			"""simple docstring"""





			__UpperCAmelCase   :      Tuple										=     [n for n in range(1001			,							10000			,							2 ) if is_prime(lowerCAmelCase__ )]
			__UpperCAmelCase   :      List[Any]										=     []

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

						for prime_member in permutations(list(str(lowerCAmelCase__ ) ) ):
									__UpperCAmelCase   :      str										=     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__ )

			__UpperCAmelCase   :      Union[str, Any]										=     []
			for candidate in candidates:
						__UpperCAmelCase   :      Tuple										=     len(lowerCAmelCase__ )
						__UpperCAmelCase   :      List[str]										=     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]] ) )
																		__UpperCAmelCase   :      str										=     True

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

			__UpperCAmelCase   :      Union[str, Any]										=     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 collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_UpperCamelCase											=			logging.get_logger(__name__)

_UpperCamelCase											=			{
    '''nghuyong/ernie-1.0-base-zh''': '''https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json''',
    '''nghuyong/ernie-2.0-base-en''': '''https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json''',
    '''nghuyong/ernie-2.0-large-en''': '''https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-base-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-medium-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-mini-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-micro-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-nano-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json''',
    '''nghuyong/ernie-gram-zh''': '''https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json''',
    '''nghuyong/ernie-health-zh''': '''https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json''',
}



class _A  (    __SCREAMING_SNAKE_CASE    ):
		_SCREAMING_SNAKE_CASE					:    Optional[int]						      =			"ernie"





		def __init__(     self ,       __UpperCAmelCase=30_522 ,       __UpperCAmelCase=768 ,       __UpperCAmelCase=12 ,       __UpperCAmelCase=12 ,       __UpperCAmelCase=3_072 ,       __UpperCAmelCase="gelu" ,       __UpperCAmelCase=0.1 ,       __UpperCAmelCase=0.1 ,       __UpperCAmelCase=512 ,       __UpperCAmelCase=2 ,       __UpperCAmelCase=3 ,       __UpperCAmelCase=False ,       __UpperCAmelCase=0.02 ,       __UpperCAmelCase=1E-12 ,       __UpperCAmelCase=0 ,       __UpperCAmelCase="absolute" ,       __UpperCAmelCase=True ,       __UpperCAmelCase=None ,       **__UpperCAmelCase ,       )       ->     List[Any]:

					'''simple docstring'''
					super().__init__(pad_token_id=__UpperCAmelCase ,       **__UpperCAmelCase				)

					__UpperCAmelCase   :      List[str]										=     vocab_size
					__UpperCAmelCase   :      Optional[int]										=     hidden_size
					__UpperCAmelCase   :      Optional[Any]										=     num_hidden_layers
					__UpperCAmelCase   :      int										=     num_attention_heads
					__UpperCAmelCase   :      int										=     hidden_act
					__UpperCAmelCase   :      List[Any]										=     intermediate_size
					__UpperCAmelCase   :      Optional[Any]										=     hidden_dropout_prob
					__UpperCAmelCase   :      Dict										=     attention_probs_dropout_prob
					__UpperCAmelCase   :      int										=     max_position_embeddings
					__UpperCAmelCase   :      str										=     type_vocab_size
					__UpperCAmelCase   :      int										=     task_type_vocab_size
					__UpperCAmelCase   :      List[str]										=     use_task_id
					__UpperCAmelCase   :      Union[str, Any]										=     initializer_range
					__UpperCAmelCase   :      Tuple										=     layer_norm_eps
					__UpperCAmelCase   :      List[str]										=     position_embedding_type
					__UpperCAmelCase   :      Union[str, Any]										=     use_cache
					__UpperCAmelCase   :      Optional[int]										=     classifier_dropout



class _A  (    __SCREAMING_SNAKE_CASE    ):





		@property
		def 							__A       (     self				)       ->     Mapping[str, Mapping[int, str]]:

					'''simple docstring'''
					if self.task == "multiple-choice":
								__UpperCAmelCase   :      Union[str, Any]										=     {0: """batch""", 1: """choice""", 2: """sequence"""}
					else:
								__UpperCAmelCase   :      Tuple										=     {0: """batch""", 1: """sequence"""}
					return OrderedDict(
					    [
					        ("""input_ids""", dynamic_axis),
					        ("""attention_mask""", dynamic_axis),
					        ("""token_type_ids""", dynamic_axis),
					        ("""task_type_ids""", dynamic_axis),
					    ]				)




