



import math

def   _lowerCAmelCase   (						):
      lowercase__     =  input('Enter message: '	)
      lowercase__     =  int(input(F'''Enter key [2-{len(A__	) - 1}]: '''	)	)
      lowercase__     =  input('Encryption/Decryption [e/d]: '	)

      if mode.lower().startswith('e'	):
            lowercase__     =  encrypt_message(A__						,  A__	)
      elif mode.lower().startswith('d'	):
            lowercase__     =  decrypt_message(A__						,  A__	)

      # Append pipe symbol (vertical bar) to identify spaces at the end.
      print(F'''Output:\n{text + '|'}'''	)

def   _lowerCAmelCase   (						A__						,  A__	):
      lowercase__     =  [''] * key
      for col in range(A__	):
            lowercase__     =  col
            while pointer < len(A__	):
                  cipher_text[col] += message[pointer]
                  pointer += key
      return "".join(A__	)

def   _lowerCAmelCase   (						A__						,  A__	):
      lowercase__     =  math.ceil(len(A__	) / key	)
      lowercase__     =  key
      lowercase__     =  (num_cols * num_rows) - len(A__	)
      lowercase__     =  [''] * num_cols
      lowercase__     =  0
      lowercase__     =  0

      for symbol in message:
            plain_text[col] += symbol
            col += 1

            if (
                (col == num_cols)
                or (col == num_cols - 1)
                and (row >= num_rows - num_shaded_boxes)
            ):
                  lowercase__     =  0
                  row += 1

      return "".join(A__	)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()





from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors

def   _lowerCAmelCase   (						A__	):
      lowercase__     =  prime_factors(A__	)
      if is_square_free(A__	):
            return -1 if len(A__	) % 2 else 1
      return 0


if __name__ == "__main__":
       import doctest

       doctest.testmod()
