



'''simple docstring'''

from math import isqrt, loga







def 						__UpperCamelCase				(							_lowercase					) ->			list[int]:
 _lowercase					:       int       =		[True] * max_number
 for i in range(2,				isqrt(max_number - 1					) + 1					):
  if is_prime[i]:
   for j in range(i**2,				a_,				a_					):
    _lowercase					:       int       =		False

 return [i for i in range(2,				a_					) if is_prime[i]]







def 						__UpperCamelCase				(							_lowercase = 80_0800,				_lowercase = 80_0800					) ->			int:
 _lowercase					:       str       =		degree * loga(a_					)
 _lowercase					:       Tuple       =		int(a_					)
 _lowercase					:       int       =		calculate_prime_numbers(a_					)

 _lowercase					:       List[Any]       =		0
 _lowercase					:       Optional[Any]       =		0
 _lowercase					:       Dict       =		len(a_					) - 1
 while left < right:
  while (
      prime_numbers[right] * loga(prime_numbers[left]					)
      + prime_numbers[left] * loga(prime_numbers[right]					)
      > upper_bound
  ):
   right -= 1
  hybrid_integers_count += right - left
  left += 1

 return hybrid_integers_count


if __name__ == "__main__":
  print(F'''{solution() = }''')





'''simple docstring'''

import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...models.auto.modeling_auto import MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
from ...utils import logging
from ..auto import CONFIG_MAPPING


_A				:    int     						=logging.get_logger(__name__)

_A				:    Union[str, Any]     						={
    '''Salesforce/instruct-blip-flan-t5''': '''https://huggingface.co/Salesforce/instruct-blip-flan-t5/resolve/main/config.json''',
}



class 		lowerCamelCase__      (						A     ):




					'''simple docstring'''



					A_						    =						"""instructblip_vision_model"""




					def __init__(  self				:	Union[str, Any]     ,  UpperCamelCase_				:	str=1408     ,  UpperCamelCase_				:	Tuple=6144     ,  UpperCamelCase_				:	Union[str, Any]=39     ,  UpperCamelCase_				:	Optional[Any]=16     ,  UpperCamelCase_				:	str=224     ,  UpperCamelCase_				:	Dict=14     ,  UpperCamelCase_				:	Dict="gelu"     ,  UpperCamelCase_				:	int=1E-6     ,  UpperCamelCase_				:	int=0.0     ,  UpperCamelCase_				:	List[str]=1E-10     ,  UpperCamelCase_				:	str=True     ,  **UpperCamelCase_				:	Dict     ,  )  ->       Any:



						'''simple docstring'''





						super().__init__(**UpperCamelCase_					)

						_lowercase					:       Optional[Any]       =		hidden_size
						_lowercase					:       Optional[Any]       =		intermediate_size
						_lowercase					:       Optional[int]       =		num_hidden_layers
						_lowercase					:       str       =		num_attention_heads
						_lowercase					:       Tuple       =		patch_size
						_lowercase					:       Dict       =		image_size
						_lowercase					:       Optional[int]       =		initializer_range
						_lowercase					:       List[Any]       =		attention_dropout
						_lowercase					:       int       =		layer_norm_eps
						_lowercase					:       Optional[int]       =		hidden_act
						_lowercase					:       str       =		qkv_bias




					@classmethod
					def 						__UpperCAmelCase     (  cls				:	List[Any]     ,  UpperCamelCase_				:	Union[str, os.PathLike]     ,  **UpperCamelCase_				:	List[str]					)  ->       "PretrainedConfig":



						'''simple docstring'''





						cls._set_token_in_kwargs(UpperCamelCase_					)

						_lowercase  ,    _lowercase					:       Tuple       =		cls.get_config_dict(UpperCamelCase_     ,  **UpperCamelCase_					)

						# get the vision config dict if we are loading from InstructBlipConfig
						if config_dict.get('model_type'					) == "instructblip":
							_lowercase					:       Any       =		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(UpperCamelCase_     ,  **UpperCamelCase_					)






class 		lowerCamelCase__      (						A     ):




					'''simple docstring'''



					A_						    =						"""instructblip_qformer"""




					def __init__(  self				:	Tuple     ,  UpperCamelCase_				:	Union[str, Any]=3_0522     ,  UpperCamelCase_				:	Union[str, Any]=768     ,  UpperCamelCase_				:	Tuple=12     ,  UpperCamelCase_				:	Optional[Any]=12     ,  UpperCamelCase_				:	List[str]=3072     ,  UpperCamelCase_				:	List[str]="gelu"     ,  UpperCamelCase_				:	Union[str, Any]=0.1     ,  UpperCamelCase_				:	List[str]=0.1     ,  UpperCamelCase_				:	Any=512     ,  UpperCamelCase_				:	Union[str, Any]=0.02     ,  UpperCamelCase_				:	List[Any]=1E-12     ,  UpperCamelCase_				:	Optional[Any]=0     ,  UpperCamelCase_				:	str="absolute"     ,  UpperCamelCase_				:	List[Any]=2     ,  UpperCamelCase_				:	Any=1408     ,  **UpperCamelCase_				:	Dict     ,  )  ->       Any:



						'''simple docstring'''





						super().__init__(pad_token_id=UpperCamelCase_     ,  **UpperCamelCase_					)

						_lowercase					:       Dict       =		vocab_size
						_lowercase					:       Optional[Any]       =		hidden_size
						_lowercase					:       Any       =		num_hidden_layers
						_lowercase					:       List[Any]       =		num_attention_heads
						_lowercase					:       Optional[int]       =		hidden_act
						_lowercase					:       Union[str, Any]       =		intermediate_size
						_lowercase					:       List[Any]       =		hidden_dropout_prob
						_lowercase					:       Dict       =		attention_probs_dropout_prob
						_lowercase					:       Any       =		max_position_embeddings
						_lowercase					:       Optional[int]       =		initializer_range
						_lowercase					:       Tuple       =		layer_norm_eps
						_lowercase					:       List[str]       =		position_embedding_type
						_lowercase					:       str       =		cross_attention_frequency
						_lowercase					:       int       =		encoder_hidden_size




					@classmethod
					def 						__UpperCAmelCase     (  cls				:	List[Any]     ,  UpperCamelCase_				:	Union[str, os.PathLike]     ,  **UpperCamelCase_				:	List[str]					)  ->       "PretrainedConfig":



						'''simple docstring'''





						cls._set_token_in_kwargs(UpperCamelCase_					)

						_lowercase  ,    _lowercase					:       List[str]       =		cls.get_config_dict(UpperCamelCase_     ,  **UpperCamelCase_					)

						# get the qformer config dict if we are loading from InstructBlipConfig
						if config_dict.get('model_type'					) == "instructblip":
							_lowercase					:       Optional[int]       =		config_dict['qformer_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(UpperCamelCase_     ,  **UpperCamelCase_					)






class 		lowerCamelCase__      (						A     ):




					'''simple docstring'''



					A_						    =						"""instructblip"""
					A_						    =						True




					def __init__(  self				:	Any     ,  UpperCamelCase_				:	List[Any]=None     ,  UpperCamelCase_				:	Tuple=None     ,  UpperCamelCase_				:	Dict=None     ,  UpperCamelCase_				:	Union[str, Any]=32     ,  **UpperCamelCase_				:	int					)  ->       List[str]:



						'''simple docstring'''





						super().__init__(**UpperCamelCase_					)

						if vision_config is None:
							_lowercase					:       Any       =		{}
							logger.info('vision_config is None. initializing the InstructBlipVisionConfig with default values.'					)

						if qformer_config is None:
							_lowercase					:       List[Any]       =		{}
							logger.info('qformer_config is None. Initializing the InstructBlipQFormerConfig with default values.'					)

						if text_config is None:
							_lowercase					:       List[Any]       =		{}
							logger.info('text_config is None. Initializing the text config with default values (`OPTConfig`).'					)

						_lowercase					:       List[Any]       =		InstructBlipVisionConfig(**UpperCamelCase_					)
						_lowercase					:       Union[str, Any]       =		InstructBlipQFormerConfig(**UpperCamelCase_					)
						_lowercase					:       Union[str, Any]       =		text_config['model_type'] if 'model_type' in text_config else 'opt'
						_lowercase					:       int       =		CONFIG_MAPPING[text_model_type](**UpperCamelCase_					)

						_lowercase					:       str       =		self.text_config.tie_word_embeddings
						_lowercase					:       int       =		self.text_config.is_encoder_decoder

						_lowercase					:       Tuple       =		num_query_tokens
						_lowercase					:       str       =		self.vision_config.hidden_size
						_lowercase					:       Union[str, Any]       =		self.text_config.model_type in MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
						_lowercase					:       List[Any]       =		1.0
						_lowercase					:       int       =		0.02




					@classmethod
					def 						__UpperCAmelCase     (  cls				:	Tuple     ,  UpperCamelCase_				:	InstructBlipVisionConfig     ,  UpperCamelCase_				:	InstructBlipQFormerConfig     ,  UpperCamelCase_				:	PretrainedConfig     ,  **UpperCamelCase_				:	Dict     ,  )  ->       List[str]:



						'''simple docstring'''





						return cls(
						    vision_config=vision_config.to_dict()     ,  qformer_config=qformer_config.to_dict()     ,  text_config=text_config.to_dict()     ,  **UpperCamelCase_     ,  )




					def 						__UpperCAmelCase     (  self				:	Dict					)  ->       List[str]:



						'''simple docstring'''





						_lowercase					:       List[Any]       =		copy.deepcopy(self.__dict__					)
						_lowercase					:       Optional[int]       =		self.vision_config.to_dict()
						_lowercase					:       Optional[Any]       =		self.qformer_config.to_dict()
						_lowercase					:       Tuple       =		self.text_config.to_dict()
						_lowercase					:       Dict       =		self.__class__.model_type
						return output
