There are people in a group, numbered from to . Initially, person has exactly coins.
You can perform a revolution as follows:
As explained in the third step, the revolution cannot be performed if the confiscated coins cannot be divided equally into integer amounts.
Is it possible to perform a revolution times in a row to make only one person remain in the end? If possible, output the sequence of persons to select at each iteration.
The first line contains the number of test cases ().
test cases follow starting from the next line, each consisting of a single line.
The first line of each test case contains the number of people ().
For each test case, output the answer as follows.
If it is possible to perform a revolution times in a row, output "YES" on the first line. On the next line, output integers separated by spaces. Here, is the number corresponding to the person removed in the -th revolution. When , the second line should be left empty because there are no revolutions performed.
This problem has input files, each generated as follows.
In the th test case, the numbers of coins starts as . Then, revolutions are performed as follows.
If it is impossible to perform a revolution times in a row, output "NO" on the first line.
If there are multiple valid answers, you may output any. You may output "YES" or "NO" in any case.
The total score for this problem is . Each input file is worth exactly score, and you gain score for each test case answered correctly.
Revolution
Choice |
Confiscated Coins |
Remaining Coins |
Number | Coins | for , for , for , for |
Number | Coins | for , for , for |
Number | Coins | for , for |
Number | Coins | for |