




import sys

lowerCamelCase__					:  Optional[int]      							=				(
    '73167176531330624919225119674426574742355349194934'
    '96983520312774506326239578318016984801869478851843'
    '85861560789112949495459501737958331952853208805511'
    '12540698747158523863050715693290963295227443043557'
    '66896648950445244523161731856403098711121722383113'
    '62229893423380308135336276614282806444486645238749'
    '30358907296290491560440772390713810515859307960866'
    '70172427121883998797908792274921901699720888093776'
    '65727333001053367881220235421809751254540594752243'
    '52584907711670556013604839586446706324415722155397'
    '53697817977846174064955149290862569321978468622482'
    '83972241375657056057490261407972968652414535100474'
    '82166370484403199890008895243450658541227588666881'
    '16427171479924442928230863465674813919123162824586'
    '17866458359124566529476545682848912883142607690042'
    '24219022671055626321111109370544217506941658960408'
    '07198403850962455444362981230987879927244284909188'
    '84580156166097919133875499200524063689912560717606'
    '05886116467109405077541002256983155200055935729725'
    '71636269561882670428252483600823257530420752963450'
)

def    UpperCAmelCase_				( __UpperCAmelCase		:      str				)   ->					int:
      SCREAMING_SNAKE_CASE_      		=     1
      for digit in s:
            product *= int(__UpperCAmelCase				)
      return product

def    UpperCAmelCase_				( __UpperCAmelCase		:      str = N				)   ->					int:
      SCREAMING_SNAKE_CASE_      		=     -sys.maxsize - 1
      SCREAMING_SNAKE_CASE_      		=     n[:13]
      SCREAMING_SNAKE_CASE_      		=     13
      while cur_index < len(__UpperCAmelCase				) - 13:
            if int(n[cur_index]				) >= int(substr[0]				):
                  SCREAMING_SNAKE_CASE_      		=     substr[1:] + n[cur_index]
                  cur_index += 1
            else:
                  SCREAMING_SNAKE_CASE_      		=     max(__UpperCAmelCase     ,     str_eval(__UpperCAmelCase				)				)
                  SCREAMING_SNAKE_CASE_      		=     n[cur_index : cur_index + 13]
                  cur_index += 13
      return largest_product


if __name__ == "__main__":
   print(f'''{solution() = }''')
import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


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

SCREAMING_SNAKE_CASE			:						Optional[int]				  =		{
    """Salesforce/blip-vqa-base""": """https://huggingface.co/Salesforce/blip-vqa-base/resolve/main/config.json""",
    """Salesforce/blip-vqa-capfit-large""": (
        """https://huggingface.co/Salesforce/blip-vqa-base-capfit/resolve/main/config.json"""
    ),
    """Salesforce/blip-image-captioning-base""": (
        """https://huggingface.co/Salesforce/blip-image-captioning-base/resolve/main/config.json"""
    ),
    """Salesforce/blip-image-captioning-large""": (
        """https://huggingface.co/Salesforce/blip-image-captioning-large/resolve/main/config.json"""
    ),
    """Salesforce/blip-itm-base-coco""": """https://huggingface.co/Salesforce/blip-itm-base-coco/resolve/main/config.json""",
    """Salesforce/blip-itm-large-coco""": """https://huggingface.co/Salesforce/blip-itm-large-coco/resolve/main/config.json""",
    """Salesforce/blip-itm-base-flikr""": """https://huggingface.co/Salesforce/blip-itm-base-flikr/resolve/main/config.json""",
    """Salesforce/blip-itm-large-flikr""": (
        """https://huggingface.co/Salesforce/blip-itm-large-flikr/resolve/main/config.json"""
    ),
}
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """blip_text_model"""

  def __init__(		self			:   Union[str, Any]  ,				__SCREAMING_SNAKE_CASE			:   str=3_05_24  ,				__SCREAMING_SNAKE_CASE			:   Any=7_68  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=7_68  ,				__SCREAMING_SNAKE_CASE			:   Tuple=30_72  ,				__SCREAMING_SNAKE_CASE			:   Any=7_68  ,				__SCREAMING_SNAKE_CASE			:   Tuple=12  ,				__SCREAMING_SNAKE_CASE			:   Dict=8  ,				__SCREAMING_SNAKE_CASE			:   int=5_12  ,				__SCREAMING_SNAKE_CASE			:   List[Any]="gelu"  ,				__SCREAMING_SNAKE_CASE			:   int=1E-12  ,				__SCREAMING_SNAKE_CASE			:   Tuple=0.0  ,				__SCREAMING_SNAKE_CASE			:   Tuple=0.0  ,				__SCREAMING_SNAKE_CASE			:   Dict=0.02  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=3_05_22  ,				__SCREAMING_SNAKE_CASE			:   Any=2  ,				__SCREAMING_SNAKE_CASE			:   List[str]=0  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=1_02  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=True  ,				__SCREAMING_SNAKE_CASE			:   Dict=True  ,				**__SCREAMING_SNAKE_CASE			:   str  ,				):
   super().__init__(
       pad_token_id=__SCREAMING_SNAKE_CASE  ,				bos_token_id=__SCREAMING_SNAKE_CASE  ,				eos_token_id=__SCREAMING_SNAKE_CASE  ,				sep_token_id=__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE  ,				)

   __a							=	vocab_size
   __a							=	hidden_size
   __a							=	encoder_hidden_size
   __a							=	intermediate_size
   __a							=	projection_dim
   __a							=	hidden_dropout_prob
   __a							=	num_hidden_layers
   __a							=	num_attention_heads
   __a							=	max_position_embeddings
   __a							=	layer_norm_eps
   __a							=	hidden_act
   __a							=	initializer_range
   __a							=	attention_probs_dropout_prob
   __a							=	is_decoder
   __a							=	use_cache

  @classmethod
  def 		_UpperCAmelCase (		cls			:   Union[str, Any]  ,				__SCREAMING_SNAKE_CASE			:   Union[str, os.PathLike]  ,				**__SCREAMING_SNAKE_CASE			:   int							):
   cls._set_token_in_kwargs(__SCREAMING_SNAKE_CASE							)

   __a							,  __a							=	cls.get_config_dict(__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)

   # get the text config dict if we are loading from BlipConfig
   if config_dict.get("model_type"							) == "blip":
    __a							=	config_dict["text_config"]

   if "model_type" in config_dict and hasattr(cls  ,				"model_type"							) and config_dict["model_type"] != cls.model_type:
    logger.warning(
        f"""You are using a model of type {config_dict["model_type"]} to instantiate a model of type """
        f"""{cls.model_type}. This is not supported for all configurations of models and can yield errors."""							)

   return cls.from_dict(__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """blip_vision_model"""

  def __init__(		self			:   Optional[int]  ,				__SCREAMING_SNAKE_CASE			:   str=7_68  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=30_72  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=5_12  ,				__SCREAMING_SNAKE_CASE			:   int=12  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=12  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=3_84  ,				__SCREAMING_SNAKE_CASE			:   str=16  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]="gelu"  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=1E-5  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=0.0  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=1E-10  ,				**__SCREAMING_SNAKE_CASE			:   List[str]  ,				):
   super().__init__(**__SCREAMING_SNAKE_CASE							)

   __a							=	hidden_size
   __a							=	intermediate_size
   __a							=	projection_dim
   __a							=	num_hidden_layers
   __a							=	num_attention_heads
   __a							=	patch_size
   __a							=	image_size
   __a							=	initializer_range
   __a							=	attention_dropout
   __a							=	layer_norm_eps
   __a							=	hidden_act

  @classmethod
  def 		_UpperCAmelCase (		cls			:   Optional[Any]  ,				__SCREAMING_SNAKE_CASE			:   Union[str, os.PathLike]  ,				**__SCREAMING_SNAKE_CASE			:   str							):
   cls._set_token_in_kwargs(__SCREAMING_SNAKE_CASE							)

   __a							,  __a							=	cls.get_config_dict(__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)

   # get the vision config dict if we are loading from BlipConfig
   if config_dict.get("model_type"							) == "blip":
    __a							=	config_dict["vision_config"]

   if "model_type" in config_dict and hasattr(cls  ,				"model_type"							) and config_dict["model_type"] != cls.model_type:
    logger.warning(
        f"""You are using a model of type {config_dict["model_type"]} to instantiate a model of type """
        f"""{cls.model_type}. This is not supported for all configurations of models and can yield errors."""							)

   return cls.from_dict(__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """blip"""
  _SCREAMING_SNAKE_CASE     					=      True

  def __init__(		self			:   Union[str, Any]  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=None  ,				__SCREAMING_SNAKE_CASE			:   Any=None  ,				__SCREAMING_SNAKE_CASE			:   int=5_12  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=2.65_92  ,				__SCREAMING_SNAKE_CASE			:   Any=2_56  ,				**__SCREAMING_SNAKE_CASE			:   Any  ,				):
   super().__init__(**__SCREAMING_SNAKE_CASE							)

   if text_config is None:
    __a							=	{}
    logger.info("`text_config` is `None`. Initializing the `BlipTextConfig` with default values."							)

   if vision_config is None:
    __a							=	{}
    logger.info("`vision_config` is `None`. Initializing the `BlipVisionConfig` with default values."							)

   __a							=	BlipTextConfig(**__SCREAMING_SNAKE_CASE							)
   __a							=	BlipVisionConfig(**__SCREAMING_SNAKE_CASE							)

   __a							=	self.vision_config.hidden_size

   __a							=	projection_dim
   __a							=	logit_scale_init_value
   __a							=	1.0
   __a							=	0.02
   __a							=	image_text_hidden_size

  @classmethod
  def 		_UpperCAmelCase (		cls			:   Any  ,				__SCREAMING_SNAKE_CASE			:   BlipTextConfig  ,				__SCREAMING_SNAKE_CASE			:   BlipVisionConfig  ,				**__SCREAMING_SNAKE_CASE			:   List[Any]							):
   return cls(text_config=text_config.to_dict()  ,				vision_config=vision_config.to_dict()  ,				**__SCREAMING_SNAKE_CASE							)

  def 		_UpperCAmelCase (		self			:   Union[str, Any]							):
   __a							=	copy.deepcopy(self.__dict__							)
   __a							=	self.text_config.to_dict()
   __a							=	self.vision_config.to_dict()
   __a							=	self.__class__.model_type
   return output


