





"""simple docstring"""






import json
from typing import Iterator, List, Union

from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers
from tokenizers.implementations.base_tokenizer import BaseTokenizer
from tokenizers.models import Unigram
from tokenizers.processors import TemplateProcessing




class 				__lowercase			(			_snake_case							):







     '''simple docstring'''




     def __init__(						self	,			_UpperCAmelCase = "▁"	,			_UpperCAmelCase = True	,			_UpperCAmelCase = "<unk>"	,			_UpperCAmelCase = "</s>"	,			_UpperCAmelCase = "<pad>"	,			):
         __a :						str			       =  {
             '''pad''': {'''id''': 0, '''token''': pad_token},
             '''eos''': {'''id''': 1, '''token''': eos_token},
             '''unk''': {'''id''': 2, '''token''': unk_token},
         }

         __a :						Any			       =  [None] * len(self.special_tokens     )
         for token_dict in self.special_tokens.values():
             __a :						str			       =  token_dict['''token''']

         __a :						Any			       =  Tokenizer(Unigram()     )

         __a :						int			       =  normalizers.Sequence(
             [
                 normalizers.Nmt(),
                 normalizers.NFKC(),
                 normalizers.Replace(Regex(''' {2,}'''     )	,			''' '''     ),
                 normalizers.Lowercase(),
             ]     )
         __a :						List[str]			       =  pre_tokenizers.Sequence(
             [
                 pre_tokenizers.Metaspace(replacement=lowerCAmelCase__	,			add_prefix_space=lowerCAmelCase__     ),
                 pre_tokenizers.Digits(individual_digits=lowerCAmelCase__     ),
                 pre_tokenizers.Punctuation(),
             ]     )
         __a :						int			       =  decoders.Metaspace(replacement=lowerCAmelCase__	,			add_prefix_space=lowerCAmelCase__     )

         __a :						str			       =  TemplateProcessing(
             single=f"""$A {self.special_tokens["eos"]["token"]}"""	,			special_tokens=[(self.special_tokens['''eos''']['''token'''], self.special_tokens['''eos''']['''id'''])]	,			)

         __a :						str			       =  {
             '''model''': '''SentencePieceUnigram''',
             '''replacement''': replacement,
             '''add_prefix_space''': add_prefix_space,
         }

         super().__init__(lowerCAmelCase__	,			lowerCAmelCase__     )







     def  _lowerCamelCase		(						self	,			_UpperCAmelCase	,			_UpperCAmelCase = 8000	,			_UpperCAmelCase = True	,			):
         __a :						str			       =  trainers.UnigramTrainer(
             vocab_size=lowerCAmelCase__	,			special_tokens=self.special_tokens_list	,			show_progress=lowerCAmelCase__	,			)

         if isinstance(lowerCAmelCase__	,			lowerCAmelCase__     ):
             __a :						Union[str, Any]			       =  [files]
         self._tokenizer.train(lowerCAmelCase__	,			trainer=lowerCAmelCase__     )

         self.add_unk_id()







     def  _lowerCamelCase		(						self	,			_UpperCAmelCase	,			_UpperCAmelCase = 8000	,			_UpperCAmelCase = True	,			):
         __a :						Any			       =  trainers.UnigramTrainer(
             vocab_size=lowerCAmelCase__	,			special_tokens=self.special_tokens_list	,			show_progress=lowerCAmelCase__	,			)

         self._tokenizer.train_from_iterator(lowerCAmelCase__	,			trainer=lowerCAmelCase__     )

         self.add_unk_id()







     def  _lowerCamelCase		(						self     ):
         __a :						int			       =  json.loads(self._tokenizer.to_str()     )

         __a :						Dict			       =  self.special_tokens['''unk''']['''id''']

         __a :						str			       =  Tokenizer.from_str(json.dumps(lowerCAmelCase__     )     )






"""simple docstring"""






from math import isqrt, loga

def     __A      (			a_						:int)		->		list[int]:
				__a :						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_):
																__a :						int			       =  False

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

def     __A      (			a_						:int = 80_08_00   ,       a_						:int = 80_08_00)		->		int:
				__a :						str			       =  degree * loga(a_)
				__a :						Tuple			       =  int(a_)
				__a :						int			       =  calculate_prime_numbers(a_)

				__a :						List[Any]			       =  0
				__a :						Optional[Any]			       =  0
				__a :						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() = }')