M. Optimal K Intervals
time limit per test
8 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

You are given an integer sequence $$$a_1,a_2,\dots,a_n$$$, find exactly $$$k$$$ disjoint consecutive subsequences from it such that the length of each consecutive subsequence is prime. Assume the sum of all integers in the $$$i$$$-th consecutive subsequence is $$$s_i$$$, you need to maximize $$$\min\{s_1,s_2,\dots,s_k\}$$$.

Note that the selected consecutive subsequences don't need to cover the entire sequence. Here, "consecutive subsequence" means that it must be contiguous (i.e. a substring).

Input

The first line contains a single integer $$$T$$$ ($$$1 \leq T \leq 100$$$), the number of test cases. For each test case:

The first line contains two integers $$$n$$$ and $$$k$$$ ($$$2\leq n\leq 200\,000$$$, $$$1\leq k\leq n$$$).

The second line contains $$$n$$$ integers $$$a_1,a_2,\dots,a_n$$$ ($$$|a_i|\leq 1000$$$).

It is guaranteed that all the values of $$$a_i$$$ are chosen uniformly at random from integers in $$$[-1000,1000]$$$. The randomness condition does not apply to the sample test case, but your solution must pass the sample as well.

It is also guaranteed that the sum of all $$$n$$$ is at most $$$10^6$$$.

Output

For each test case, output a single line containing an integer, denoting the maximum possible value of $$$\min\{s_1,s_2,\dots,s_k\}$$$. If there is no solution, please output "impossible" instead.

Example
Input
4
6 1
1 1 4 5 1 4
6 1
-1 -1 -4 -5 -1 -4
6 3
-1 -1 -4 -5 -1 -4
2 2
0 0
Output
15
-2
-9
impossible