
"""simple docstring"""





def 						_lowerCAmelCase				(				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = []
		__SCREAMING_SNAKE_CASE            = []
		__SCREAMING_SNAKE_CASE            = {
		    """^""": 3,
		    """*""": 2,
		    """/""": 2,
		    """%""": 2,
		    """+""": 1,
		    """-""": 1,
		}  # Priority of each operator
		__SCREAMING_SNAKE_CASE            = len(UpperCamelCase_				) if (len(UpperCamelCase_				) > 7) else 7

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

		for x in infix:
				if x.isalpha() or x.isdigit():
						post_fix.append(UpperCamelCase_				)  # if x is Alphabet / Digit, add it to Postfix
				elif x == "(":
						stack.append(UpperCamelCase_				)  # 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(UpperCamelCase_				) == 0:
								stack.append(UpperCamelCase_				)  # If stack is empty, push x to stack
						else:  # while priority of x is not > priority of element in the stack
								while len(UpperCamelCase_				) > 0 and priority[x] <= priority[stack[-1]]:
										post_fix.append(stack.pop()				)  # pop stack & add to Postfix
								stack.append(UpperCamelCase_				)  # push x to stack

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

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

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



def 						_lowerCAmelCase				(				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = list(infix[::-1]				)  # reverse the infix equation

		for i in range(len(UpperCamelCase_				)				):
				if infix[i] == "(":
						__SCREAMING_SNAKE_CASE            = """)"""  # change "(" to ")"
				elif infix[i] == ")":
						__SCREAMING_SNAKE_CASE            = """("""  # change ")" to "("

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


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






"""simple docstring"""





from __future__ import annotations

from fractions import Fraction



def 						_lowerCAmelCase				(				UpperCamelCase_  ,				UpperCamelCase_				):
		return (
		    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
		)



def 						_lowerCAmelCase				(				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = []
		__SCREAMING_SNAKE_CASE            = 11
		__SCREAMING_SNAKE_CASE            = int("""1""" + """0""" * digit_len				)
		for num in range(UpperCamelCase_  ,				UpperCamelCase_				):
				while den <= 99:
						if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
								if is_digit_cancelling(UpperCamelCase_  ,				UpperCamelCase_				):
										solutions.append(f"{num}/{den}"				)
						den += 1
				num += 1
				__SCREAMING_SNAKE_CASE            = 10
		return solutions



def 						_lowerCAmelCase				(				UpperCamelCase_ = 2				):
		__SCREAMING_SNAKE_CASE            = 1.0
		for fraction in fraction_list(UpperCamelCase_				):
				__SCREAMING_SNAKE_CASE            = Fraction(UpperCamelCase_				)
				result *= frac.denominator / frac.numerator
		return int(UpperCamelCase_				)


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




