{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003eWPH has a ring which contains n positive integers.\u003c/p\u003e \n \u003cp\u003eHe has super power to cut the ring into k segments, each segment containing single or multiple integers.\u003c/p\u003e \n \u003cp\u003eFor one cutting plan, WPH thinks the elegance of it will be the greatest common divisor of the sums of each segment.\u003c/p\u003e \n \u003cp\u003eHe wants to maximize the elegance of the cutting plan.\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003eThe first line with one integer n, denoting the number of integers on the ring.\u003c/p\u003e \n \u003cp\u003eThe next line with n positive integers, the i-th number a\u003csub\u003ei\u003c/sub\u003e denoting the i-th integer on the ring.\u003c/p\u003e \n \u003cp\u003eData Limit:\u003c/p\u003e \n \u003cp\u003e1\u0026lt;\u003dn\u0026lt;\u003d2000, 1\u0026lt;\u003da\u003csub\u003ei\u003c/sub\u003e\u0026lt;\u003d5*10\u003csup\u003e7\u003c/sup\u003e\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003eOutput n lines. The i-th line contains an integer denoting the maximum elegance when cutting the ring into i segments.\u003c/p\u003e \n \u003c/div\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e7\r\n2 3 3 3 3 3 3\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e20\r\n5\r\n2\r\n2\r\n1\r\n1\r\n1\u003c/pre\u003e \n "}}]}