


"""simple docstring"""
import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


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

SCREAMING_SNAKE_CASE					:       str							   =							{
    """facebook/musicgen-small""": """https://huggingface.co/facebook/musicgen-small/resolve/main/config.json""",
    # See all Musicgen models at https://huggingface.co/models?filter=musicgen
}



class      _UpperCAmelCase					(				__snake_case							):






		'''simple docstring'''

		lowerCamelCase__           ='musicgen_decoder'
		lowerCamelCase__           =['past_key_values']



		def __init__(self							,			a_=20_48							,			a_=20_48							,			a_=24							,			a_=40_96							,			a_=16							,			a_=0.0							,			a_=True							,			a_="gelu"							,			a_=10_24							,			a_=0.1							,			a_=0.0							,			a_=0.0							,			a_=0.02							,			a_=False							,			a_=4							,			a_=20_48							,			a_=20_48							,			a_=None							,			a_=False							,			**a_							,			):





			'''simple docstring'''

			__snake_case      :		Union[str, Any]         =							vocab_size
			__snake_case      :		str         =							max_position_embeddings
			__snake_case      :		Tuple         =							hidden_size
			__snake_case      :		Tuple         =							ffn_dim
			__snake_case      :		Tuple         =							num_hidden_layers
			__snake_case      :		Union[str, Any]         =							num_attention_heads
			__snake_case      :		List[str]         =							dropout
			__snake_case      :		List[Any]         =							attention_dropout
			__snake_case      :		Dict         =							activation_dropout
			__snake_case      :		Optional[int]         =							activation_function
			__snake_case      :		Optional[Any]         =							initializer_factor
			__snake_case      :		Any         =							layerdrop
			__snake_case      :		int         =							use_cache
			__snake_case      :		List[str]         =							scale_embedding  # scale factor will be sqrt(d_model) if True
			__snake_case      :		Optional[Any]         =							num_codebooks
			super().__init__(
			    pad_token_id=a_							,			bos_token_id=a_							,			eos_token_id=a_							,			tie_word_embeddings=a_							,			**a_							,			)



class      _UpperCAmelCase					(				__snake_case							):






		'''simple docstring'''

		lowerCamelCase__           ='musicgen'
		lowerCamelCase__           =True



		def __init__(self							,			**a_   ):





			'''simple docstring'''

			super().__init__(**a_   )
			if "text_encoder" not in kwargs or "audio_encoder" not in kwargs or "decoder" not in kwargs:
				raise ValueError('''Config has to be initialized with text_encoder, audio_encoder and decoder config'''   )

			__snake_case      :		int         =							kwargs.pop('''text_encoder'''   )
			__snake_case      :		Optional[int]         =							text_encoder_config.pop('''model_type'''   )

			__snake_case      :		Tuple         =							kwargs.pop('''audio_encoder'''   )
			__snake_case      :		Union[str, Any]         =							audio_encoder_config.pop('''model_type'''   )

			__snake_case      :		str         =							kwargs.pop('''decoder'''   )

			__snake_case      :		Optional[Any]         =							AutoConfig.for_model(a_							,			**a_   )
			__snake_case      :		int         =							AutoConfig.for_model(a_							,			**a_   )
			__snake_case      :		Union[str, Any]         =							MusicgenDecoderConfig(**a_   )
			__snake_case      :		str         =							True



		@classmethod
		def 							SCREAMING_SNAKE_CASE    (cls							,			a_							,			a_							,			a_							,			**a_							,			):





			'''simple docstring'''

			return cls(
			    text_encoder=text_encoder_config.to_dict()							,			audio_encoder=audio_encoder_config.to_dict()							,			decoder=decoder_config.to_dict()							,			**a_							,			)



		def 							SCREAMING_SNAKE_CASE    (self   ):





			'''simple docstring'''

			__snake_case      :		int         =							copy.deepcopy(self.__dict__   )
			__snake_case      :		Union[str, Any]         =							self.text_encoder.to_dict()
			__snake_case      :		Any         =							self.audio_encoder.to_dict()
			__snake_case      :		Optional[int]         =							self.decoder.to_dict()
			__snake_case      :		Any         =							self.__class__.model_type
			return output









'''simple docstring'''






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if a < b:
          return gcd(lowerCAmelCase__					,    lowerCAmelCase__		)
     if a % b == 0:
          return b
     return gcd(lowerCAmelCase__					,    a % b		)






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if y == 0:
          return 1
     _a         =				power(lowerCAmelCase__					,    y // 2					,    lowerCAmelCase__		) % mod
     _a         =				(temp * temp) % mod
     if y % 2 == 1:
          _a         =				(temp * x) % mod
     return temp






def 						_A					(lowerCAmelCase__	:int		) ->	bool:




     '''simple docstring'''



     _a         =				2
     while b < n:
          if gcd(lowerCAmelCase__					,    lowerCAmelCase__		) == 1 and power(lowerCAmelCase__					,    n - 1					,    lowerCAmelCase__		) != 1:
               return False
          b += 1
     return True


if __name__ == "__main__":
 a_       :     Any 							=     int(input("Enter number: ").strip())
 if is_carmichael_number(number):
  print(f'''{number} is a Carmichael Number.''')
 else:
  print(f'''{number} is not a Carmichael Number.''')

