




import numpy as np
import PIL
import torch
import torchvision.transforms as T
import torchvision.transforms.functional as TF
from PIL import Image






def    snake_case   (				A		,  A=256     )				->				Union[str, Any]:




	'''simple docstring'''


	lowerCamelCase_				:						Optional[Any]				  =				min(img.size     )

	if s < target_image_size:
		raise ValueError(f"min dim for image {s} < {target_image_size}"     )

	lowerCamelCase_				:						Optional[Any]				  =				target_image_size / s
	lowerCamelCase_				:						Optional[int]				  =				(round(r * img.size[1]     ), round(r * img.size[0]     ))
	lowerCamelCase_				:						Any				  =				TF.resize(A		,  A		,  interpolation=PIL.Image.LANCZOS     )
	lowerCamelCase_				:						str				  =				TF.center_crop(A		,  output_size=2 * [target_image_size]     )
	lowerCamelCase_				:						Union[str, Any]				  =				torch.unsqueeze(T.ToTensor()(A     )		,  0     )
	return img






def    snake_case   (				A     )				->				Optional[Any]:




	'''simple docstring'''


	lowerCamelCase_				:						Dict				  =				2.0 * x - 1.0
	return x






def    snake_case   (				A		,  A=True		,  A="RGB"     )				->				Optional[Any]:




	'''simple docstring'''


	lowerCamelCase_				:						List[Any]				  =				x.detach().cpu()
	if process:
		lowerCamelCase_				:						Dict				  =				post_process_tensor(A     )
	lowerCamelCase_				:						Tuple				  =				x.numpy()
	if process:
		lowerCamelCase_				:						Dict				  =				(255 * x).astype(np.uinta     )
	lowerCamelCase_				:						Tuple				  =				Image.fromarray(A     )
	if not x.mode == mode:
		lowerCamelCase_				:						List[str]				  =				x.convert(A     )
	return x






def    snake_case   (				A     )				->				Any:




	'''simple docstring'''


	lowerCamelCase_				:						Optional[int]				  =				torch.clamp(A		,  -1.0		,  1.0     )
	lowerCamelCase_				:						List[str]				  =				(x + 1.0) / 2.0
	lowerCamelCase_				:						Any				  =				x.permute(1		,  2		,  0     )
	return x






def    snake_case   (				A     )				->				Tuple:




	'''simple docstring'''


	lowerCamelCase_				:						Dict				  =				post_process_tensor(x.squeeze()     )
	return x.permute(2		,  0		,  1     ).unsqueeze(0     )






def    snake_case   (				A		,  A     )				->				int:




	'''simple docstring'''


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






def    snake_case   (				A		,  A		,  A     )				->				int:




	'''simple docstring'''


	if y == 0:
		return 1
	lowerCamelCase_				:						int				  =				power(A		,  y // 2		,  A     ) % mod
	lowerCamelCase_				:						List[Any]				  =				(temp * temp) % mod
	if y % 2 == 1:
		lowerCamelCase_				:						str				  =				(temp * x) % mod
	return temp






def    snake_case   (				A     )				->				bool:




	'''simple docstring'''


	lowerCamelCase_				:						Union[str, Any]				  =				2
	while b < n:
		if gcd(A		,  A     ) == 1 and power(A		,  n - 1		,  A     ) != 1:
			return False
		b += 1
	return True


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