

def   _lowerCAmelCase(						__A ,							__A      ):






  if a < b:
    return gcd(_UpperCAmelCase ,							_UpperCAmelCase      )
  if a % b == 0:
    return b
  return gcd(_UpperCAmelCase ,							a % b      )
def   _lowerCAmelCase(						__A ,							__A ,							__A      ):






  if y == 0:
    return 1
  UpperCAmelCase          =	power(_UpperCAmelCase ,							y // 2 ,							_UpperCAmelCase      ) % mod
  UpperCAmelCase          =	(temp * temp) % mod
  if y % 2 == 1:
    UpperCAmelCase          =	(temp * x) % mod
  return temp
def   _lowerCAmelCase(						__A      ):
  UpperCAmelCase          =	2
  while b < n:
    if gcd(_UpperCAmelCase ,							_UpperCAmelCase      ) == 1 and power(_UpperCAmelCase ,							n - 1 ,							_UpperCAmelCase      ) != 1:
      return False
    b += 1
  return True


if __name__ == "__main__":
      lowerCAmelCase__							=			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.")








from typing import List, Optional, Tuple, Union

from . import logging
from .import_utils import is_torch_available, is_torch_version


if is_torch_available():
		import torch

__magic_name__       =     logging.get_logger(__name__)  # pylint: disable=invalid-name

try:
		from torch._dynamo import allow_in_graph as maybe_allow_in_graph
except (ImportError, ModuleNotFoundError):





		def 		__snake_case						(    cls				):
							"""simple docstring"""






							return cls





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase = None       ,			_UpperCAmelCase = None       ,			_UpperCAmelCase = None       ,			_UpperCAmelCase = None       ,			):
					"""simple docstring"""






					lowercase						   =       device
					lowercase						   =       shape[0]

					lowercase						   =       layout or torch.strided
					lowercase						   =       device or torch.device('cpu'				)

					if generator is not None:
										lowercase						   =       generator.device.type if not isinstance(_UpperCAmelCase       ,			_UpperCAmelCase				) else generator[0].device.type
										if gen_device_type != device.type and gen_device_type == "cpu":
															lowercase						   =       'cpu'
															if device != "mps":
																				logger.info(
																				    f"""The passed generator was created on 'cpu' even though a tensor on {device} was expected."""
																				    f""" Tensors will be created on 'cpu' and then moved to {device}. Note that one can probably"""
																				    f""" slighly speed up this function by passing a generator that was created on the {device} device."""				)
										elif gen_device_type != device.type and gen_device_type == "cuda":
															raise ValueError(f"""Cannot generate a {device} tensor from a generator of type {gen_device_type}."""				)

					if isinstance(_UpperCAmelCase       ,			_UpperCAmelCase				):
										lowercase						   =       (1,) + shape[1:]
										lowercase						   =       [
										    torch.randn(_UpperCAmelCase       ,			generator=generator[i]       ,			device=_UpperCAmelCase       ,			dtype=_UpperCAmelCase       ,			layout=_UpperCAmelCase				)
										    for i in range(_UpperCAmelCase				)
										]
										lowercase						   =       torch.cat(_UpperCAmelCase       ,			dim=0				).to(_UpperCAmelCase				)
					else:
										lowercase						   =       torch.randn(_UpperCAmelCase       ,			generator=_UpperCAmelCase       ,			device=_UpperCAmelCase       ,			dtype=_UpperCAmelCase       ,			layout=_UpperCAmelCase				).to(_UpperCAmelCase				)

					return latents





def 		__snake_case						(    _UpperCAmelCase				):
					"""simple docstring"""






					if is_torch_version('<'       ,			'2.0.0'				) or not hasattr(_UpperCAmelCase       ,			'_dynamo'				):
										return False
					return isinstance(_UpperCAmelCase       ,			torch._dynamo.eval_frame.OptimizedModule				)






