'''simple docstring'''




from collections import OrderedDict
from typing import Any, List, Mapping, Optional

from ... import PretrainedConfig, PreTrainedTokenizer
from ...onnx import OnnxConfig, PatchingSpec
from ...utils import TensorType, is_torch_available, logging


__UpperCAmelCase  							=logging.get_logger(__name__)

__UpperCAmelCase  							={
    '''microsoft/layoutlm-base-uncased''': (
        '''https://huggingface.co/microsoft/layoutlm-base-uncased/resolve/main/config.json'''
    ),
    '''microsoft/layoutlm-large-uncased''': (
        '''https://huggingface.co/microsoft/layoutlm-large-uncased/resolve/main/config.json'''
    ),
}





class 					a__   (     lowercase__				):
     lowerCamelCase						:  Optional[Any]							="""layoutlm"""






     def __init__(				self	:	List[Any]						,       a	:	List[Any]=3_05_22						,       a	:	Dict=7_68						,       a	:	Optional[Any]=12						,       a	:	Any=12						,       a	:	Optional[Any]=30_72						,       a	:	int="gelu"						,       a	:	List[str]=0.1						,       a	:	Dict=0.1						,       a	:	str=5_12						,       a	:	str=2						,       a	:	Union[str, Any]=0.02						,       a	:	Dict=1e-1_2						,       a	:	Optional[Any]=0						,       a	:	Optional[Any]="absolute"						,       a	:	int=True						,       a	:	Union[str, Any]=10_24						,       **a	:	Optional[Any]						,       ):





         """simple docstring"""



         super().__init__(pad_token_id=_A						,       **_A					)
         __lowerCamelCase						=						vocab_size
         __lowerCamelCase						=						hidden_size
         __lowerCamelCase						=						num_hidden_layers
         __lowerCamelCase						=						num_attention_heads
         __lowerCamelCase						=						hidden_act
         __lowerCamelCase						=						intermediate_size
         __lowerCamelCase						=						hidden_dropout_prob
         __lowerCamelCase						=						attention_probs_dropout_prob
         __lowerCamelCase						=						max_position_embeddings
         __lowerCamelCase						=						type_vocab_size
         __lowerCamelCase						=						initializer_range
         __lowerCamelCase						=						layer_norm_eps
         __lowerCamelCase						=						position_embedding_type
         __lowerCamelCase						=						use_cache
         __lowerCamelCase						=						max_ad_position_embeddings





class 					a__   (     lowercase__				):






     def __init__(				self	:	int						,       a	:	PretrainedConfig						,       a	:	str = "default"						,       a	:	List[PatchingSpec] = None						,       ):





         """simple docstring"""



         super().__init__(_A						,       task=_A						,       patching_specs=_A					)
         __lowerCamelCase						=						config.max_ad_position_embeddings - 1






     @property
     def      SCREAMING_SNAKE_CASE__     (				self	:	Any					):





         """simple docstring"""



         return OrderedDict(
             [
                 ('''input_ids''', {0: '''batch''', 1: '''sequence'''}),
                 ('''bbox''', {0: '''batch''', 1: '''sequence'''}),
                 ('''attention_mask''', {0: '''batch''', 1: '''sequence'''}),
                 ('''token_type_ids''', {0: '''batch''', 1: '''sequence'''}),
             ]					)






     def      SCREAMING_SNAKE_CASE__     (				self	:	Tuple						,       a	:	PreTrainedTokenizer						,       a	:	int = -1						,       a	:	int = -1						,       a	:	bool = False						,       a	:	Optional[TensorType] = None						,       ):





         """simple docstring"""



         __lowerCamelCase						=						super().generate_dummy_inputs(
             _A						,       batch_size=_A						,       seq_length=_A						,       is_pair=_A						,       framework=_A					)

         # Generate a dummy bbox
         __lowerCamelCase						=						[48, 84, 73, 1_28]

         if not framework == TensorType.PYTORCH:
             raise NotImplementedError('''Exporting LayoutLM to ONNX is currently only supported for PyTorch.'''					)

         if not is_torch_available():
             raise ValueError('''Cannot generate dummy inputs without PyTorch installed.'''					)
         import torch

         __lowerCamelCase						=						input_dict['input_ids'].shape
         __lowerCamelCase						=						torch.tensor([*[box] * seq_length]					).tile(_A						,       1						,       1					)
         return input_dict

'''simple docstring'''




__UpperCAmelCase  							=1_0**8






def __lowerCAmelCase				(							UpperCamelCase__       )			->					bool:
    if n % 10 == 0:
        return False
    __lowerCamelCase						=						str(UpperCamelCase__       )
    return s == s[::-1]






def __lowerCAmelCase				(							)			->					int:
    __lowerCamelCase						=						set()
    __lowerCamelCase						=						1
    __lowerCamelCase						=						5
    while sum_squares < LIMIT:
        __lowerCamelCase						=						first_square + 1
        while sum_squares < LIMIT:
            if is_palindrome(UpperCamelCase__       ):
                answer.add(UpperCamelCase__       )
            last_square += 1
            sum_squares += last_square**2
        first_square += 1
        __lowerCamelCase						=						first_square**2 + (first_square + 1) ** 2

    return sum(UpperCamelCase__       )


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