
"""simple docstring"""

from typing import Mapping

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


UpperCamelCase      :							List[Any]          =					logging.get_logger(__name__)

UpperCamelCase      :							Tuple          =					{
    "google/long-t5-local-base": "https://huggingface.co/google/long-t5-local-base/blob/main/config.json",
    "google/long-t5-local-large": "https://huggingface.co/google/long-t5-local-large/blob/main/config.json",
    "google/long-t5-tglobal-base": "https://huggingface.co/google/long-t5-tglobal-base/blob/main/config.json",
    "google/long-t5-tglobal-large": "https://huggingface.co/google/long-t5-tglobal-large/blob/main/config.json",
}

class __lowerCAmelCase						( __SCREAMING_SNAKE_CASE     ):
     lowercase		  =		"longt5"
     lowercase		  =		["past_key_values"]
     lowercase		  =		{"hidden_size": "d_model", "num_attention_heads": "num_heads", "num_hidden_layers": "num_layers"}





     def __init__(      self      ,	__UpperCAmelCase=3_2128      ,	__UpperCAmelCase=512      ,	__UpperCAmelCase=64      ,	__UpperCAmelCase=2048      ,	__UpperCAmelCase=6      ,	__UpperCAmelCase=None      ,	__UpperCAmelCase=8      ,	__UpperCAmelCase=127      ,	__UpperCAmelCase=16      ,	__UpperCAmelCase=32      ,	__UpperCAmelCase=128      ,	__UpperCAmelCase=0.1      ,	__UpperCAmelCase=1E-6      ,	__UpperCAmelCase=1.0      ,	__UpperCAmelCase="relu"      ,	__UpperCAmelCase=True      ,	__UpperCAmelCase="local"      ,	__UpperCAmelCase=True      ,	__UpperCAmelCase=0      ,	__UpperCAmelCase=1      ,	**__UpperCAmelCase      ,	):

      '''simple docstring'''




      __UpperCamelCase							    =			vocab_size
      __UpperCamelCase							    =			d_model
      __UpperCamelCase							    =			d_kv
      __UpperCamelCase							    =			d_ff
      __UpperCamelCase							    =			num_layers
      # default = symmetry
      __UpperCamelCase							    =			num_decoder_layers if num_decoder_layers is not None else self.num_layers
      __UpperCamelCase							    =			num_heads
      __UpperCamelCase							    =			local_radius
      __UpperCamelCase							    =			global_block_size
      __UpperCamelCase							    =			relative_attention_num_buckets
      __UpperCamelCase							    =			relative_attention_max_distance
      __UpperCamelCase							    =			dropout_rate
      __UpperCamelCase							    =			layer_norm_epsilon
      __UpperCamelCase							    =			initializer_factor
      __UpperCamelCase							    =			feed_forward_proj
      __UpperCamelCase							    =			encoder_attention_type
      __UpperCamelCase							    =			use_cache

      __UpperCamelCase							    =			self.feed_forward_proj.split('-' )
      __UpperCamelCase							    =			act_info[-1]
      __UpperCamelCase							    =			act_info[0] == 'gated'

      if len(__UpperCAmelCase ) > 1 and act_info[0] != "gated" or len(__UpperCAmelCase ) > 2:
       raise ValueError(
           F'`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer.'
           'Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. '
           '\'gated-gelu\' or \'relu\'' )

      # for backwards compatibility
      if feed_forward_proj == "gated-gelu":
       __UpperCamelCase							    =			'gelu_new'

      super().__init__(
          pad_token_id=__UpperCAmelCase      ,	eos_token_id=__UpperCAmelCase      ,	is_encoder_decoder=__UpperCAmelCase      ,	**__UpperCAmelCase      ,	)


class __lowerCAmelCase						( __SCREAMING_SNAKE_CASE     ):





     @property
     def 		UpperCAmelCase   (      self ):

      '''simple docstring'''




      __UpperCamelCase							    =			{
          'input_ids': {0: 'batch', 1: 'encoder_sequence'},
          'attention_mask': {0: 'batch', 1: 'encoder_sequence'},
      }
      if self.use_past:
       __UpperCamelCase							    =			'past_encoder_sequence + sequence'
       __UpperCamelCase							    =			{0: 'batch'}
       __UpperCamelCase							    =			{0: 'batch', 1: 'past_decoder_sequence + sequence'}
      else:
       __UpperCamelCase							    =			{0: 'batch', 1: 'decoder_sequence'}
       __UpperCamelCase							    =			{0: 'batch', 1: 'decoder_sequence'}

      if self.use_past:
       self.fill_with_past_key_values_(__UpperCAmelCase      ,	direction='inputs' )

      return common_inputs







     @property
     def 		UpperCAmelCase   (      self ):

      '''simple docstring'''




      return 13





"""simple docstring"""

import math
from itertools import permutations






def 				A		(							snake_case :int						) ->      bool:

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






def 				A		(							snake_case :int							,   snake_case :list						) ->      bool:
 __UpperCamelCase    ,      __UpperCamelCase							    =			0, len(snake_case						) - 1
 while left <= right:
  __UpperCamelCase							    =			(left + right) // 2
  if prime_list[middle] == target:
   return True
  elif prime_list[middle] < target:
   __UpperCamelCase							    =			middle + 1
  else:
   __UpperCamelCase							    =			middle - 1

 return False






def 				A		(							) ->      int:
 __UpperCamelCase							    =			[n for n in range(1_0_0_1							,   1_0_0_0_0							,   2						) if is_prime(snake_case						)]
 __UpperCamelCase							    =			[]

 for number in prime_list:
  __UpperCamelCase							    =			[]

  for prime_member in permutations(list(str(snake_case						)						)						):
   __UpperCamelCase							    =			int(''.join(snake_case						)						)

   if prime % 2 == 0:
    continue

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

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

 __UpperCamelCase							    =			[]
 for candidate in candidates:
  __UpperCamelCase							    =			len(snake_case						)
  __UpperCamelCase							    =			False

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

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

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

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


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



