SOLVE
LATER
Ryotsu loves playing with prime numbers. His father was a mathematics professor. To test Ryotsu's knowledge of primes, his father gave him a simple task. The task is to find the sum of every K^{th} prime numbers in given list of numbers. He's having trouble solving it, being an elementary school student. Help him accomplish the task.
Input Format:
The first line of the input contains an integer T denoting the number of test cases.
Each test case contains two space separated integers N and K followed by N space separated numbers.
Output Format:
For each test case, output the sum of every K^{th} prime number followed by newline.
Constraints:
In Case 1, N=11 and K=3. First occurrence of K^{th} prime number is 5. Second occurrence of K^{th} prime number is 11 so sum is 16.
Similarly for Case 2, sum is 18.