




'''simple docstring'''



from functools import reduce

UpperCAmelCase_							:	List[str]	     =		(
    '''73167176531330624919225119674426574742355349194934'''
    '''96983520312774506326239578318016984801869478851843'''
    '''85861560789112949495459501737958331952853208805511'''
    '''12540698747158523863050715693290963295227443043557'''
    '''66896648950445244523161731856403098711121722383113'''
    '''62229893423380308135336276614282806444486645238749'''
    '''30358907296290491560440772390713810515859307960866'''
    '''70172427121883998797908792274921901699720888093776'''
    '''65727333001053367881220235421809751254540594752243'''
    '''52584907711670556013604839586446706324415722155397'''
    '''53697817977846174064955149290862569321978468622482'''
    '''83972241375657056057490261407972968652414535100474'''
    '''82166370484403199890008895243450658541227588666881'''
    '''16427171479924442928230863465674813919123162824586'''
    '''17866458359124566529476545682848912883142607690042'''
    '''24219022671055626321111109370544217506941658960408'''
    '''07198403850962455444362981230987879927244284909188'''
    '''84580156166097919133875499200524063689912560717606'''
    '''05886116467109405077541002256983155200055935729725'''
    '''71636269561882670428252483600823257530420752963450'''
)







def       _UpperCamelCase			(_lowerCamelCase				:  str = N						)-> int:




     '''simple docstring'''





     return max(
         # mypy cannot properly interpret reduce
         int(reduce(lambda _lowerCamelCase ,						_lowerCamelCase						: str(int(_lowerCamelCase						) * int(_lowerCamelCase						)						) ,						n[i : i + 13]						)						)
         for i in range(len(_lowerCamelCase						) - 12						)						)


if __name__ == "__main__":
     print(F"""{solution() = }""")












'''simple docstring'''



def       _UpperCamelCase			(_lowerCamelCase				:  Optional[Any]						)-> Dict:




     '''simple docstring'''





     __snake_case            =	[]
     __snake_case            =	[]
     __snake_case            =	{
         '''^''': 3,
         '''*''': 2,
         '''/''': 2,
         '''%''': 2,
         '''+''': 1,
         '''-''': 1,
     }  # Priority of each operator
     __snake_case            =	len(_lowerCamelCase						) if (len(_lowerCamelCase						) > 7) else 7

     # Print table header for output
     print(
         '''Symbol'''.center(8						) ,						'''Stack'''.center(_lowerCamelCase						) ,						'''Postfix'''.center(_lowerCamelCase						) ,						sep=''' | ''' ,						)
     print('''-''' * (print_width * 3 + 7)						)

     for x in infix:
          if x.isalpha() or x.isdigit():
               post_fix.append(_lowerCamelCase						)  # if x is Alphabet / Digit, add it to Postfix
          elif x == "(":
               stack.append(_lowerCamelCase						)  # if x is "(" push to Stack
          elif x == ")":  # if x is ")" pop stack until "(" is encountered
               while stack[-1] != "(":
                    post_fix.append(stack.pop()						)  # Pop stack & add the content to Postfix
               stack.pop()
          else:
               if len(_lowerCamelCase						) == 0:
                    stack.append(_lowerCamelCase						)  # If stack is empty, push x to stack
               else:  # while priority of x is not > priority of element in the stack
                    while len(_lowerCamelCase						) > 0 and priority[x] <= priority[stack[-1]]:
                         post_fix.append(stack.pop()						)  # pop stack & add to Postfix
                    stack.append(_lowerCamelCase						)  # push x to stack

          print(
              x.center(8						) ,						(''''''.join(_lowerCamelCase						)).ljust(_lowerCamelCase						) ,						(''''''.join(_lowerCamelCase						)).ljust(_lowerCamelCase						) ,						sep=''' | ''' ,						)  # Output in tabular format

     while len(_lowerCamelCase						) > 0:  # while stack is not empty
          post_fix.append(stack.pop()						)  # pop stack & add to Postfix
          print(
              ''' '''.center(8						) ,						(''''''.join(_lowerCamelCase						)).ljust(_lowerCamelCase						) ,						(''''''.join(_lowerCamelCase						)).ljust(_lowerCamelCase						) ,						sep=''' | ''' ,						)  # Output in tabular format

     return "".join(_lowerCamelCase						)  # return Postfix as str







def       _UpperCamelCase			(_lowerCamelCase				:  Optional[Any]						)-> str:




     '''simple docstring'''





     __snake_case            =	list(infix[::-1]						)  # reverse the infix equation

     for i in range(len(_lowerCamelCase						)						):
          if infix[i] == "(":
               __snake_case            =	''')'''  # change "(" to ")"
          elif infix[i] == ")":
               __snake_case            =	'''('''  # change ")" to "("

     return (infix_2_postfix(''''''.join(_lowerCamelCase						)						))[
         ::-1
     ]  # call infix_2_postfix on Infix, return reverse of Postfix


if __name__ == "__main__":
     UpperCAmelCase_							:	Dict	     =		input('''\nEnter an Infix Equation = ''')  # Input an Infix equation
     UpperCAmelCase_							:	Optional[Any]	     =		''''''.join(Infix.split())  # Remove spaces from the input
     print('''\n\t''', Infix, '''(Infix) -> ''', infix_2_prefix(Infix), '''(Prefix)''')






