




def   lowerCAmelCase						(						_lowerCAmelCase							:				str  ,							_lowerCAmelCase							:				str		):




	"""simple docstring"""







	if not isinstance(__lowercase  ,							__lowercase		):
		raise TypeError("plaintext must be a string"		)
	if not isinstance(__lowercase  ,							__lowercase		):
		raise TypeError("key must be a string"		)

	if not plaintext:
		raise ValueError("plaintext is empty"		)
	if not key:
		raise ValueError("key is empty"		)

	key += plaintext
	UpperCAmelCase__								=  plaintext.lower()
	UpperCAmelCase__								=  key.lower()
	UpperCAmelCase__								=  0
	UpperCAmelCase__								=  0
	UpperCAmelCase__								=  ""
	while plaintext_iterator < len(__lowercase		):
		if (
		    ord(plaintext[plaintext_iterator]		) < 97
		    or ord(plaintext[plaintext_iterator]		) > 122
		):
			ciphertext += plaintext[plaintext_iterator]
			plaintext_iterator += 1
		elif ord(key[key_iterator]		) < 97 or ord(key[key_iterator]		) > 122:
			key_iterator += 1
		else:
			ciphertext += chr(
			    (
			        (ord(plaintext[plaintext_iterator]		) - 97 + ord(key[key_iterator]		))
			        - 97
			    )
			    % 26
			    + 97		)
			key_iterator += 1
			plaintext_iterator += 1
	return ciphertext



def   lowerCAmelCase						(						_lowerCAmelCase							:				str  ,							_lowerCAmelCase							:				str		):




	"""simple docstring"""







	if not isinstance(__lowercase  ,							__lowercase		):
		raise TypeError("ciphertext must be a string"		)
	if not isinstance(__lowercase  ,							__lowercase		):
		raise TypeError("key must be a string"		)

	if not ciphertext:
		raise ValueError("ciphertext is empty"		)
	if not key:
		raise ValueError("key is empty"		)

	UpperCAmelCase__								=  key.lower()
	UpperCAmelCase__								=  0
	UpperCAmelCase__								=  0
	UpperCAmelCase__								=  ""
	while ciphertext_iterator < len(__lowercase		):
		if (
		    ord(ciphertext[ciphertext_iterator]		) < 97
		    or ord(ciphertext[ciphertext_iterator]		) > 122
		):
			plaintext += ciphertext[ciphertext_iterator]
		else:
			plaintext += chr(
			    (ord(ciphertext[ciphertext_iterator]		) - ord(key[key_iterator]		)) % 26
			    + 97		)
			key += chr(
			    (ord(ciphertext[ciphertext_iterator]		) - ord(key[key_iterator]		)) % 26
			    + 97		)
			key_iterator += 1
		ciphertext_iterator += 1
	return plaintext


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		_lowerCAmelCase  :				Any						=				int(input("Type 1 to encrypt or 2 to decrypt:"))
		if operation == 1:
				_lowerCAmelCase  :				Optional[Any]						=				input("Typeplaintext to be encrypted:\n")
				_lowerCAmelCase  :				List[Any]						=				input("Type the key:\n")
				print(encrypt(plaintext, key))
		elif operation == 2:
				_lowerCAmelCase  :				Optional[Any]						=				input("Type the ciphertext to be decrypted:\n")
				_lowerCAmelCase  :				Dict						=				input("Type the key:\n")
				print(decrypt(ciphertext, key))
		decrypt("jsqqs avvwo", "coffee")











def   lowerCAmelCase						(						_lowerCAmelCase							:				int  ,							_lowerCAmelCase							:				int		):




 """simple docstring"""







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



def   lowerCAmelCase						(						_lowerCAmelCase							:				int  ,							_lowerCAmelCase							:				int  ,							_lowerCAmelCase							:				int		):




 """simple docstring"""







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



def   lowerCAmelCase						(						_lowerCAmelCase							:				int		):




 """simple docstring"""







 UpperCAmelCase__								=  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__":
  _lowerCAmelCase  :				Dict						=				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.''')





