You are given a list $$$a = (a_1, \ldots, a_n)$$$ of $$$n$$$ non-negative integers, and you must answer $$$p$$$ queries of the form: given $$$k$$$, print the sum of values of $$$a$$$ at positions that are coprime to $$$k$$$. In other words, return the sum of values of $$$a_i$$$ for those $$$i$$$ such that $$$\text{gcd}(k, i) = 1$$$, where $$$\text{gcd}(k, i)$$$ is the greatest common divisor of $$$k$$$ and $$$i$$$.
The first line of the input contains the number of cases $$$T$$$.
Each case starts with a line of input with two integers $$$n$$$ and $$$p$$$, the size of $$$a$$$ and the number of queries.
The following line of each case contains $$$n$$$ integers $$$a_1, \ldots, a_n$$$.
The next line of each case contains $$$p$$$ integers, the values of $$$k$$$ for each of the queries.
For each case, you must print a line with $$$p$$$ integers, the answers to each of the queries.
34 41 1 1 11 2 3 410 43 9 2 3 4 5 5 0 2 17 1 3 28 11000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000000001
4 2 3 2 29 34 25 16 8000000000