






"""simple docstring"""
from __future__ import annotations



class        UpperCamelCase__ :







    """simple docstring"""







    def __init__(		self :	str				,    UpperCamelCase_ :	int = 0 ):





           '''simple docstring'''

           __magic_name__      				=    key







    def 				a__			(		self :	int				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           __magic_name__      				=    key or self.__key or 1

           # make sure key is an appropriate size
           key %= 2_5_5

           return [chr(ord(UpperCamelCase_ ) ^ key ) for ch in content]







    def 				a__			(		self :	int				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           __magic_name__      				=    key or self.__key or 1

           # make sure key is an appropriate size
           key %= 2_5_5

           return [chr(ord(UpperCamelCase_ ) ^ key ) for ch in content]







    def 				a__			(		self :	Tuple				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int = 0 ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           __magic_name__      				=    key or self.__key or 1

           # make sure key can be any size
           while key > 2_5_5:
                  key -= 2_5_5

           # This will be returned
           __magic_name__      				=    ''

           for ch in content:
                  ans += chr(ord(UpperCamelCase_ ) ^ key )

           return ans







    def 				a__			(		self :	int				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int = 0 ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           __magic_name__      				=    key or self.__key or 1

           # make sure key can be any size
           while key > 2_5_5:
                  key -= 2_5_5

           # This will be returned
           __magic_name__      				=    ''

           for ch in content:
                  ans += chr(ord(UpperCamelCase_ ) ^ key )

           return ans







    def 				a__			(		self :	Any				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int = 0 ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           try:
                  with open(UpperCamelCase_ ) as fin, open('encrypt.out'				,    'w+' ) as fout:
                         # actual encrypt-process
                         for line in fin:
                                fout.write(self.encrypt_string(UpperCamelCase_				,    UpperCamelCase_ ) )

           except OSError:
                  return False

           return True







    def 				a__			(		self :	Tuple				,    UpperCamelCase_ :	str				,    UpperCamelCase_ :	int ):





           '''simple docstring'''

           assert isinstance(UpperCamelCase_				,    UpperCamelCase_ ) and isinstance(UpperCamelCase_				,    UpperCamelCase_ )

           try:
                  with open(UpperCamelCase_ ) as fin, open('decrypt.out'				,    'w+' ) as fout:
                         # actual encrypt-process
                         for line in fin:
                                fout.write(self.decrypt_string(UpperCamelCase_				,    UpperCamelCase_ ) )

           except OSError:
                  return False

           return True


# Tests
# crypt = XORCipher()
# key = 67

# # test encrypt
# print(crypt.encrypt("hallo welt",key))
# # test decrypt
# print(crypt.decrypt(crypt.encrypt("hallo welt",key), key))

# # test encrypt_string
# print(crypt.encrypt_string("hallo welt",key))

# # test decrypt_string
# print(crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key))

# if (crypt.encrypt_file("test.txt",key)):
#       print("encrypt successful")
# else:
#       print("encrypt unsuccessful")

# if (crypt.decrypt_file("encrypt.out",key)):
#       print("decrypt successful")
# else:
#       print("decrypt unsuccessful")







"""simple docstring"""
from maths.prime_check import is_prime


def 							A						(				__snake_case: int  )    ->		int:

       """simple docstring"""





       if not isinstance(__snake_case ,     __snake_case  ):
              __magic_name__      				=    F"""Input value of [number={number}] must be an integer"""
              raise TypeError(__snake_case  )
       if is_prime(__snake_case  ) and is_prime(number + 2  ):
              return number + 2
       else:
              return -1


if __name__ == "__main__":
 import doctest

 doctest.testmod()