{"raw_statement":[{"iden":"problem statement","content":"Gorillas in Kyoto University are good at math. They are currently trying to solve problems to find the value of an expression that contains two functions, `_` , `^`. Each of these functions takes two input values. `_` function returns the smaller of the two input values and `^` function returns the larger. Gorillas know that integers in the expression are non-negative and less than or equal to $99$, but can not find out the length of the expression until they read a terminal symbol `?` that represents the end of the expression. The number of characters included in each expression is less than or equal to 1000, but they do not even know this fact. Ai, a smart gorilla, noticed that she may be able to know the value of the expression even if they don't read the whole expression.\nFor example,\nAssume you read the following sentence from the left.\n\n^(41,3)?\n\nWhen you read the sixth character, that is, when you read the following expression,\n\n^(41,3\n\nyou can tell the second input value of the funcion is whether $3$ or an integer between $30$ and $39$, and the value turns out $41$.\nSince Ai wants to solve problems earlier than other gorillas, she decided to solve the problems such that she reads as fewer characters as possible from the left. For each expression, Find the value of the expression and the minimum number of characters Ai needs to read to know the value."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}