
import math
from itertools import permutations
def     UpperCAmelCase__							(       __magic_name__						:     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(__magic_name__  ) + 1  )							,  6  ):
										if number % i == 0 or number % (i + 2) == 0:
															return False
					return True
def     UpperCAmelCase__							(       __magic_name__						:     int							,  __magic_name__						:     list  ):


					'''simple docstring'''

					lowerCAmelCase	,							lowerCAmelCase		:					Optional[Any]  	=     0, len(__magic_name__  ) - 1
					while left <= right:
										lowerCAmelCase		:					List[Any]  	=     (left + right) // 2
										if prime_list[middle] == target:
															return True
										elif prime_list[middle] < target:
															lowerCAmelCase		:					Union[str, Any]  	=     middle + 1
										else:
															lowerCAmelCase		:					Union[str, Any]  	=     middle - 1

					return False
def     UpperCAmelCase__							(       ):


					'''simple docstring'''

					lowerCAmelCase		:					Dict  	=     [n for n in range(10_01							,  1_00_00							,  2  ) if is_prime(__magic_name__  )]
					lowerCAmelCase		:					Any  	=     []

					for number in prime_list:
										lowerCAmelCase		:					List[Any]  	=     []

										for prime_member in permutations(list(str(__magic_name__  )  )  ):
															lowerCAmelCase		:					str  	=     int(''''''.join(__magic_name__  )  )

															if prime % 2 == 0:
																				continue

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

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

					lowerCAmelCase		:					List[Any]  	=     []
					for candidate in candidates:
										lowerCAmelCase		:					Dict  	=     len(__magic_name__  )
										lowerCAmelCase		:					Union[str, Any]  	=     False

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

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

					lowerCAmelCase		:					List[str]  	=     set()
					for seq in passed:
										answer.add(''''''.join([str(__magic_name__  ) for i in seq]  )  )

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


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


from ctypes import c_float, sizeof
from enum import Enum
from typing import TYPE_CHECKING, Optional, Union


if TYPE_CHECKING:
		from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore


class 		__magic_name__   (						snake_case    ):
		_lowerCAmelCase		=	c_float





		@property
		def       _A							(							self    :	int				):
							return sizeof(self.value				)



def     UpperCAmelCase__							(       __magic_name__						:     int							,  __magic_name__						:     int							,  __magic_name__						:     int = 0  ):


					'''simple docstring'''

					if dimension <= 0:
										lowerCAmelCase		:					Tuple  	=     fixed_dimension

					dimension -= num_token_to_add
					return dimension
def     UpperCAmelCase__							(       __magic_name__						:     int							,  __magic_name__						:     ParameterFormat  ):


					'''simple docstring'''

					return num_parameters * dtype.size
def     UpperCAmelCase__							(       __magic_name__						:     str  ):


					'''simple docstring'''

					from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore

					try:
										return AutoProcessor.from_pretrained(__magic_name__  )
					except (ValueError, OSError, KeyError):
										lowerCAmelCase	,							lowerCAmelCase		:					Any  	=     None, None
										try:
															lowerCAmelCase		:					Union[str, Any]  	=     AutoTokenizer.from_pretrained(__magic_name__  )
										except (OSError, KeyError):
															pass
										try:
															lowerCAmelCase		:					List[Any]  	=     AutoFeatureExtractor.from_pretrained(__magic_name__  )
										except (OSError, KeyError):
															pass

										if tokenizer is not None and feature_extractor is not None:
															raise ValueError(
															    f'''Couldn\'t auto-detect preprocessor for {model_name}. Found both a tokenizer and a feature extractor.'''  )
										elif tokenizer is None and feature_extractor is None:
															return None
										elif tokenizer is not None:
															return tokenizer
										else:
															return feature_extractor
