


import math
from itertools import permutations





def 							__a       (					__A	):

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





def 							__a       (					__A ,       __A	):
    SCREAMING_SNAKE_CASE__     ,		SCREAMING_SNAKE_CASE__					     =						0, len(__A	) - 1
    while left <= right:
        SCREAMING_SNAKE_CASE__					     =						(left + right) // 2
        if prime_list[middle] == target:
            return True
        elif prime_list[middle] < target:
            SCREAMING_SNAKE_CASE__					     =						middle + 1
        else:
            SCREAMING_SNAKE_CASE__					     =						middle - 1

    return False





def 							__a       (					):
    SCREAMING_SNAKE_CASE__					     =						[n for n in range(1001 ,       10000 ,       2	) if is_prime(__A	)]
    SCREAMING_SNAKE_CASE__					     =						[]

    for number in prime_list:
        SCREAMING_SNAKE_CASE__					     =						[]

        for prime_member in permutations(list(str(__A	)	)	):
            SCREAMING_SNAKE_CASE__					     =						int("".join(__A	)	)

            if prime % 2 == 0:
                continue

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

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

    SCREAMING_SNAKE_CASE__					     =						[]
    for candidate in candidates:
        SCREAMING_SNAKE_CASE__					     =						len(__A	)
        SCREAMING_SNAKE_CASE__					     =						False

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

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

    SCREAMING_SNAKE_CASE__					     =						set()
    for seq in passed:
        answer.add("".join([str(__A	) for i in seq]	)	)

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


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





from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


A__        =			logging.get_logger(__name__)

A__        =			{
    "facebook/convnext-tiny-224": "https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json",
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}







class    UpperCamelCase_			(  _snake_case		,     _snake_case			):


  """simple docstring"""
  SCREAMING_SNAKE_CASE__				: List[str]										=      """convnext"""



  def __init__(	self    :				Optional[Any]     ,  A_    :				Any=3     ,  A_    :				Tuple=4     ,  A_    :				Optional[int]=4     ,  A_    :				Dict=None     ,  A_    :				List[Any]=None     ,  A_    :				Union[str, Any]="gelu"     ,  A_    :				Optional[Any]=0.02     ,  A_    :				Union[str, Any]=1E-1_2     ,  A_    :				Dict=1E-6     ,  A_    :				List[str]=0.0     ,  A_    :				int=224     ,  A_    :				Optional[Any]=None     ,  A_    :				List[str]=None     ,  **A_    :				Union[str, Any]     ,  )					-> Tuple:
      super().__init__(**A_	)

      SCREAMING_SNAKE_CASE__					     =						num_channels
      SCREAMING_SNAKE_CASE__					     =						patch_size
      SCREAMING_SNAKE_CASE__					     =						num_stages
      SCREAMING_SNAKE_CASE__					     =						[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
      SCREAMING_SNAKE_CASE__					     =						[3, 3, 9, 3] if depths is None else depths
      SCREAMING_SNAKE_CASE__					     =						hidden_act
      SCREAMING_SNAKE_CASE__					     =						initializer_range
      SCREAMING_SNAKE_CASE__					     =						layer_norm_eps
      SCREAMING_SNAKE_CASE__					     =						layer_scale_init_value
      SCREAMING_SNAKE_CASE__					     =						drop_path_rate
      SCREAMING_SNAKE_CASE__					     =						image_size
      SCREAMING_SNAKE_CASE__					     =						["stem"] + [f"stage{idx}" for idx in range(1     ,  len(self.depths	) + 1	)]
      SCREAMING_SNAKE_CASE__     ,		SCREAMING_SNAKE_CASE__					     =						get_aligned_output_features_output_indices(
          out_features=A_     ,  out_indices=A_     ,  stage_names=self.stage_names	)







class    UpperCamelCase_			(  _snake_case			):


  """simple docstring"""
  SCREAMING_SNAKE_CASE__				: Dict										=      version.parse("""1.11"""			)



  @property
  def      _UpperCamelCase    (	self    :				str	)					-> Mapping[str, Mapping[int, str]]:
      return OrderedDict(
          [
              ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
          ]	)







  @property
  def      _UpperCamelCase    (	self    :				Tuple	)					-> float:
      return 1E-5


