'''simple docstring'''




from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available


@dataclass
class    UpperCAmelCase__	(							_lowerCAmelCase      ):






   """simple docstring"""
   A				:							Tuple			     =     {
       '''sld_warmup_steps''': 15,
       '''sld_guidance_scale''': 20,
       '''sld_threshold''': 0.0,
       '''sld_momentum_scale''': 0.0,
       '''sld_mom_beta''': 0.0,
   }
   A				:							Any			     =     {
       '''sld_warmup_steps''': 10,
       '''sld_guidance_scale''': 10_00,
       '''sld_threshold''': 0.01,
       '''sld_momentum_scale''': 0.3,
       '''sld_mom_beta''': 0.4,
   }
   A				:							List[str]			     =     {
       '''sld_warmup_steps''': 7,
       '''sld_guidance_scale''': 20_00,
       '''sld_threshold''': 0.025,
       '''sld_momentum_scale''': 0.5,
       '''sld_mom_beta''': 0.7,
   }
   A				:							Tuple			     =     {
       '''sld_warmup_steps''': 0,
       '''sld_guidance_scale''': 50_00,
       '''sld_threshold''': 1.0,
       '''sld_momentum_scale''': 0.5,
       '''sld_mom_beta''': 0.7,
   }



@dataclass
class    UpperCAmelCase__	(							_lowerCAmelCase      ):






   """simple docstring"""
   A				:							List[Any]			     =     42
   A				:							List[str]			     =     42
   A				:							Tuple			     =     42
   A				:							Optional[int]			     =     42


if is_transformers_available() and is_torch_available():
 from .pipeline_stable_diffusion_safe import StableDiffusionPipelineSafe
 from .safety_checker import SafeStableDiffusionSafetyChecker







from __future__ import annotations





def  _snake_case		(snake_case_					:     int  )							->		int | None:
  for r in range(1    ,       snake_case_  ):
    __UpperCAmelCase	:  List[str]		=     []
    for x in range(n - 1  ):
      __UpperCAmelCase	:  Union[str, Any]		=     pow(snake_case_    ,       snake_case_    ,       snake_case_  )
      if val in li:
        break
      li.append(snake_case_  )
    else:
      return r
  return None


if __name__ == "__main__":
      _SCREAMING_SNAKE_CASE							 =			int(input('''Enter a prime number q: '''))
      _SCREAMING_SNAKE_CASE							 =			find_primitive(q)
      if a is None:
            print(F'''Cannot find the primitive for the value: {a!r}''')
      else:
            _SCREAMING_SNAKE_CASE							 =			int(input('''Enter private key of A: '''))
            _SCREAMING_SNAKE_CASE							 =			pow(a, a_private, q)
            _SCREAMING_SNAKE_CASE							 =			int(input('''Enter private key of B: '''))
            _SCREAMING_SNAKE_CASE							 =			pow(a, b_private, q)

            _SCREAMING_SNAKE_CASE							 =			pow(b_public, a_private, q)
            _SCREAMING_SNAKE_CASE							 =			pow(a_public, b_private, q)

            print('''The key value generated by A is: ''', a_secret)
            print('''The key value generated by B is: ''', b_secret)





