'''simple docstring'''




def _UpperCamelCase (							SCREAMING_SNAKE_CASE_ = 10**6				):






     if n <= 0:
          raise ValueError('Please enter an integer greater than 0'				)

     lowercase_       :							List[str]  					=       list(range(n + 1				)				)
     for number in range(2	,							n + 1				):
          if phi[number] == number:
               phi[number] -= 1
               for multiple in range(number * 2	,							n + 1	,							__lowerCamelCase				):
                    lowercase_       :							Optional[Any]  					=       (phi[multiple] // number) * (number - 1)

     lowercase_       :							Optional[int]  					=       1
     for number in range(1	,							n + 1				):
          if (answer / phi[answer]) < (number / phi[number]):
               lowercase_       :							List[Any]  					=       number

     return answer


if __name__ == "__main__":
 print(solution())








'''simple docstring'''

import os
import sys
import time

from . import transposition_cipher as trans_cipher






def __UpperCamelCase (      )   ->  None:







     '''simple docstring'''






     _a            =		"Prehistoric Men.txt"
     _a            =		"Output.txt"
     _a            =		int(input("Enter key: "					)					)
     _a            =		input("Encrypt/Decrypt [e/d]: "					)

     if not os.path.exists(__lowerCamelCase					):
          print(F"File {input_file} does not exist. Quitting..."					)
          sys.exit()
     if os.path.exists(__lowerCamelCase					):
          print(F"Overwrite {output_file}? [y/n]"					)
          _a            =		input("> "					)
          if not response.lower().startswith("y"					):
               sys.exit()

     _a            =		time.time()
     if mode.lower().startswith("e"					):
          with open(__lowerCamelCase					) as f:
               _a            =		f.read()
          _a            =		trans_cipher.encrypt_message(__lowerCamelCase   ,	__lowerCamelCase					)
     elif mode.lower().startswith("d"					):
          with open(__lowerCamelCase					) as f:
               _a            =		f.read()
          _a            =		trans_cipher.decrypt_message(__lowerCamelCase   ,	__lowerCamelCase					)

     with open(__lowerCamelCase   ,	"w"					) as output_obj:
          output_obj.write(__lowerCamelCase					)

     _a            =		round(time.time() - start_time   ,	2					)
     print(("Done (", total_time, "seconds )")					)


if __name__ == "__main__":
   main()

