{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eRecently, the ruins of the ancient city have been found on one of the planets in the system of Betelgeuse. Particular attention was drawn to the well-preserved temple with walls covered with numerous texts. Transcription revealed that they tell about the social structure and the culture of the lost civilization.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIn particular, the lettering described how the production and distribution of food was organized in the heyday of this civilization. It was found that around the city there were fields with some edible plants characterized by extremely high yield. In the autumn any citizen could come to any such field and take its share of the fruits. This share was strictly fixed, and the shares of any two residents were equal. One could take no more and no less than his share was. If someone came to the field and saw that there were less fruits than he needed, he took nothing and went to another field.\r\nThe remaining fruits were let to seeds, so from each of them some new fruits would grow next year. This number was always the same and did not depend on the year or which fruit the seeds were collected from. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eYou found tablets with some numbers at the place where the field nearest to the city once was. Perhaps an annual account of the fruit remaining at the beginning of winter in this field was carried out on these tablets. You also suggested that by this time of the year the quantity of fruit in the field was always less than the size of one share. The appearance of several tablets changed over years, and it is possible that more recent ones had a completely different purpose. Find the size of the share per capita and growth rate (how many fruits grew from seeds from one piece of fruit) that is consistent with as much of the oldest tablets as possible.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains an integer \u003ci\u003en\u003c/i\u003e that is an amount of tablets (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10\u003csup\u003e4\u003c/sup\u003e).\r\nThe second line contains integers \u003ci\u003ea\u003c/i\u003e\u003csub\u003e0\u003c/sub\u003e, \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, …, \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e − 1\u003c/sub\u003e, written on the tablets (0 ≤ \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e).\r\n\u003ci\u003ea\u003c/i\u003e\u003csub\u003e0\u003c/sub\u003e is written on the oldest tablet, \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e − 1\u003c/sub\u003e is written on the newest one.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput integers \u003ci\u003eL\u003c/i\u003e, \u003ci\u003eP\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e, meaning that integers on the first \u003ci\u003eL\u003c/i\u003e tablets don’t contradict the size of the share \u003ci\u003eP\u003c/i\u003e and growth rate \u003ci\u003ek\u003c/i\u003e.\r\nIntegers \u003ci\u003eP\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e must meet the following restrictions:\r\n1 ≤ \u003ci\u003eP\u003c/i\u003e ≤ 2 · 10\u003csup\u003e18\u003c/sup\u003e; 0 ≤ \u003ci\u003ek\u003c/i\u003e ≤ 2 · 10\u003csup\u003e18\u003c/sup\u003e (it is \r\nguaranteed that among the solutions of the problem there is at least one satisfying \r\nthese constraints). \r\nIf there are several solutions with maximum value \u003ci\u003eL\u003c/i\u003e, output any of them.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n1 2 4 8 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5 16 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n4 2 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3 5 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}