{"raw_statement":[{"iden":"problem statement","content":"Given is a sequence of $N$ positive integers: $A = (A_1, A_2, \\ldots, A_N)$. You can do the following operation on this sequence at least zero and at most $K$ times:\n\n*   choose $i\\in {1,2,\\ldots,N}$ and add $1$ to $A_i$.\n\nFind the maximum possible value of $\\gcd(A_1, A_2, \\ldots, A_N)$ after your operations."},{"iden":"constraints","content":"*   $2\\leq N\\leq 3\\times 10^5$\n*   $1\\leq K\\leq 10^{18}$\n*   $1 \\leq A_i\\leq 3\\times 10^5$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$A_1$ $A_2$ $\\ldots$ $A_N$"},{"iden":"sample input 1","content":"3 6\n3 4 9"},{"iden":"sample output 1","content":"5\n\nOne way to achieve $\\gcd(A_1, A_2, A_3) = 5$ is as follows.\n\n*   Do the operation with $i = 1$ twice, with $i = 2$ once, and with $i = 3$ once, for a total of four times, which is not more than $K=6$.\n*   Now we have $A_1 = 5$, $A_2 = 5$, $A_3 = 10$, for which $\\gcd(A_1, A_2, A_3) = 5$."},{"iden":"sample input 2","content":"3 4\n30 10 20"},{"iden":"sample output 2","content":"10\n\nDoing no operation achieves $\\gcd(A_1, A_2, A_3) = 10$."},{"iden":"sample input 3","content":"5 12345\n1 2 3 4 5"},{"iden":"sample output 3","content":"2472"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}