{"raw_statement":[{"iden":"statement","content":"In a far away kingdom young pages help to set the table for the King. As they are terribly mischievous, one needs to keep an eye on the control whether they have set everything correctly. This time the royal chef Gerasim had the impression that the pages have played a prank again: they had poured the juice from one cup to another. Now Gerasim wants to check his hypothesis. The good thing is that chef Gerasim always pour the same number of milliliters of juice to all cups in the royal kitchen. Having thoroughly measured the juice in each cup, Gerasim asked you to write a program that will determine from which cup juice was poured to which one; otherwise, the program should determine that this time the pages set the table diligently.\n\nTo simplify your task we shall consider the cups to be bottomless so that the juice never overfills a cup and pours out, however much it can be. Besides, by some strange reason in a far away kingdom one can only pour to a cup or from one cup to another an integer number of milliliters of juice."},{"iden":"input","content":"The first line contains integer _n_ — the number of cups on the royal table (1 ≤ _n_ ≤ 1000). Next _n_ lines contain volumes of juice in each cup — non-negative integers, not exceeding 104."},{"iden":"output","content":"If the pages didn't pour the juice, print \"_Exemplary pages._\" (without the quotes). If you can determine the volume of juice poured during exactly one juice pouring, print \"__v_ ml. from cup #_a_ to cup #_b_._\" (without the quotes), where _v_ represents the volume of poured juice, _a_ represents the number of the cup from which the juice was poured (the cups are numbered with consecutive positive integers starting from one in the order in which the cups are described in the input data), _b_ represents the number of the cup into which the juice was poured. Finally, if the given juice's volumes cannot be obtained using no more than one pouring (for example, the pages poured the juice from one cup to another more than once or the royal kitchen maids poured the juice into the cups incorrectly), print \"_Unrecoverable configuration._\" (without the quotes)."},{"iden":"examples","content":"Input\n\n5\n270\n250\n250\n230\n250\n\nOutput\n\n20 ml. from cup #4 to cup #1.\n\nInput\n\n5\n250\n250\n250\n250\n250\n\nOutput\n\nExemplary pages.\n\nInput\n\n5\n270\n250\n249\n230\n250\n\nOutput\n\nUnrecoverable configuration."}],"translated_statement":"[{\"iden\":\"statement\",\"content\":\"在遥远的王国里，年轻侍从负责为国王摆设餐桌。由于他们极其淘气，必须监督他们是否正确地完成了任务。这一次，皇家厨师格拉西姆怀疑侍从们又恶作剧了：他们把一个杯子中的果汁倒进了另一个杯子。现在格拉西姆想验证自己的猜想。幸运的是，皇家厨房里，格拉西姆总是给每个杯子倒入相同体积的果汁（以毫升计）。在仔细测量了每个杯子中的果汁体积后，格拉西姆请你编写一个程序，判断果汁是从哪个杯子倒到哪个杯子的；如果未发生倒果汁操作，则程序应判定侍从们这次认真完成了任务。\\n\\n为简化任务，我们假设杯子是无底的，因此无论倒入多少果汁，都不会溢出。此外，由于某种奇怪的原因，在这个遥远的王国中，只能倒入或倒出整数毫升的果汁。\\n\\n第一行包含整数 #cf_span[n] —— 皇家餐桌上杯子的数量（#cf_span[1 ≤ n ≤ 1000]）。接下来的 #cf_span[n] 行包含每个杯子中的果汁体积——非负整数，不超过 #cf_span[104]。\\n\\n如果侍从们没有倒果汁，请输出 \\\"_Exemplary pages._\\\"（不含引号）。如果可以确定恰好一次倒果汁操作中倒出的体积，请输出 \\\"_#cf_span[v] ml. from cup ##cf_span[a] to cup ##cf_span[b]._\\\"（不含引号），其中 #cf_span[v] 表示倒出的果汁体积，#cf_span[a] 表示果汁倒出的杯子编号（杯子按输入顺序从 1 开始连续编号），#cf_span[b] 表示果汁倒入的杯子编号。最后，如果给定的果汁体积无法通过不超过一次倒果汁操作得到（例如，侍从们多次倒果汁，或皇家厨房女仆最初分装果汁时出错），请输出 \\\"_Unrecoverable configuration._\\\"（不含引号）。\"},{\"iden\":\"input\",\"content\":\"第一行包含整数 #cf_span[n] —— 皇家餐桌上杯子的数量（#cf_span[1 ≤ n ≤ 1000]）。接下来的 #cf_span[n] 行包含每个杯子中的果汁体积——非负整数，不超过 #cf_span[104]。\"},{\"iden\":\"output\",\"content\":\"如果侍从们没有倒果汁，请输出 \\\"_Exemplary pages._\\\"（不含引号）。如果可以确定恰好一次倒果汁操作中倒出的体积，请输出 \\\"_#cf_span[v] ml. from cup ##cf_span[a] to cup ##cf_span[b]._\\\"（不含引号），其中 #cf_span[v] 表示倒出的果汁体积，#cf_span[a] 表示果汁倒出的杯子编号（杯子按输入顺序从 1 开始连续编号），#cf_span[b] 表示果汁倒入的杯子编号。最后，如果给定的果汁体积无法通过不超过一次倒果汁操作得到（例如，侍从们多次倒果汁，或皇家厨房女仆最初分装果汁时出错），请输出 \\\"_Unrecoverable configuration._\\\"（不含引号）。\"},{\"iden\":\"examples\",\"content\":\"输入5270250250230250输出20 ml. from cup #4 to cup #1.输入5250250250250250输出Exemplary pages.输入5270250249230250输出Unrecoverable configuration.\"}]}","sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of cups.  \nLet $ V = (v_1, v_2, \\dots, v_n) $ be the sequence of non-negative integers representing the current volume of juice in each cup, where $ v_i \\in \\mathbb{Z}_{\\geq 0} $ and $ v_i \\leq 10^4 $.\n\nLet $ v_{\\text{orig}} \\in \\mathbb{Z}_{>0} $ be the original uniform volume poured into each cup (unknown, but identical for all cups before any pouring).\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 1000 $  \n2. $ v_i \\in \\mathbb{Z}_{\\geq 0} $ for all $ i \\in \\{1, \\dots, n\\} $  \n3. Juice may be poured only between two cups in a single operation, transferring an integer volume $ v \\in \\mathbb{Z}_{>0} $ from one cup to another.  \n4. Only **at most one** pouring operation occurred (or none).\n\n**Objective**  \nDetermine which of the following holds:  \n\n- **Case 0 (No pouring):** If all $ v_i $ are equal, output:  \n  $ \\texttt{\"Exemplary pages.\"} $\n\n- **Case 1 (One valid pouring):** If there exist distinct indices $ a, b \\in \\{1, \\dots, n\\} $ and $ v \\in \\mathbb{Z}_{>0} $ such that:  \n  - $ v_a = v_{\\text{orig}} - v $,  \n  - $ v_b = v_{\\text{orig}} + v $,  \n  - $ v_i = v_{\\text{orig}} $ for all $ i \\notin \\{a, b\\} $,  \n  then output:  \n  $ \\texttt{\"} v \\texttt{ ml. from cup } a \\texttt{ to cup } b \\texttt{.\"} $\n\n- **Case 2 (Unrecoverable):** Otherwise, output:  \n  $ \\texttt{\"Unrecoverable configuration.\"} $\n\nNote: $ v_{\\text{orig}} $ must be consistent across all non-affected cups.","simple_statement":null,"has_page_source":false}