



"""simple docstring"""






import math
from itertools import permutations






def 	snake_case__  (						__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 	snake_case__  (						__lowerCamelCase							:       int				,						__lowerCamelCase							:       list      ):
			"""simple docstring"""
			lowerCamelCase__      ,  lowerCamelCase__						:						List[Any]						      =0, len(__lowerCamelCase      ) - 1
			while left <= right:
						lowerCamelCase__						:						Optional[int]						      =(left + right) // 2
						if prime_list[middle] == target:
									return True
						elif prime_list[middle] < target:
									lowerCamelCase__						:						Any						      =middle + 1
						else:
									lowerCamelCase__						:						int						      =middle - 1

			return False






def 	snake_case__  (						):
			"""simple docstring"""
			lowerCamelCase__						:						Any						      =[n for n in range(1001				,						10000				,						2      ) if is_prime(__lowerCamelCase      )]
			lowerCamelCase__						:						Optional[Any]						      =[]

			for number in prime_list:
						lowerCamelCase__						:						str						      =[]

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

			lowerCamelCase__						:						Optional[int]						      =[]
			for candidate in candidates:
						lowerCamelCase__						:						Optional[Any]						      =len(__lowerCamelCase      )
						lowerCamelCase__						:						Tuple						      =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]]      )      )
																		lowerCamelCase__						:						str						      =True

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

			lowerCamelCase__						:						List[str]						      =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"""






def 	snake_case__  (						__lowerCamelCase							:       Union[str, Any]      ):
			"""simple docstring"""
			lowerCamelCase__						:						Dict						      =len(__lowerCamelCase      )
			for i in range(length - 1      ):
						lowerCamelCase__						:						Any						      =False
						for j in range(length - 1 - i      ):
									if collection[j] > collection[j + 1]:
												lowerCamelCase__						:						List[str]						      =True
												lowerCamelCase__      ,  lowerCamelCase__						:						List[str]						      =collection[j + 1], collection[j]
						if not swapped:
									break  # Stop iteration if the collection is sorted.
			return collection


if __name__ == "__main__":
		import doctest
		import time

		doctest.testmod()

		_lowercase					:					str 		=		input("Enter numbers separated by a comma:").strip()
		_lowercase					:					Dict 		=		[int(item) for item in user_input.split(",")]
		_lowercase					:					Optional[Any] 		=		time.process_time()
		print(*bubble_sort(unsorted), sep=",")
		print(f'Processing time: {(time.process_time() - start)%1E9 + 7}')




