There are n stones numbered from 1 to n. The weight of the i-th stone is i kilograms. We divide the stones into k groups. Each group consists of exactly stones. We define the weight of each group is sum of the stones’ weights in the group. Can we divide the stones so that the weights of all groups are same?
输入解释
The first line of input contains an integer T (1 <= T <= 100) denoting the number of test cases. Each test case consists of one line containing two integers n (1 ≤ n ≤ 100000), k (k is divisor of n). It is guaranteed that the sum of n overall test cases does not exceed 500000.
输出解释
For each test case, if you can’t divide into k groups satisfying condition, print “no”. Else if you can divide into k groups satisfying condition, print “yes” in one line and then print k lines. The i-th line represent the indices of stones belonging to the i-th group. If there are multiple solutions, you can print any of them.