Problem Statement
You are given positive integers $M,K$.
Determine whether there exist a positive integer $N$ and an integer sequence $A=(A_1,A_2,\ldots, A_N)$ that satisfy all the following conditions, and if they exist, find one.
$1\le N\le M$$0\le A_i < M$$(1\le i\le N)$- There are exactly
$K$integers$0\le k < M$such that there exists a pair of indices$(i,j)$satisfying$k\equiv A_i+A_j \pmod M$.
You are given $T$ test cases, so find the answer for each.
Constraints
$1\le T\le 2\times 10^5$$1\le K\le M\le 2\times 10^5$- The sum of
$M$over all test cases is at most$2\times 10^5$. - All input values are integers.
Input
The input is given from Standard Input in the following format:
T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T
Each test case is given in the following format:
M K
Output
Output your solutions for the test cases in order, separated by newlines.
For each test case, if there are no $N,A$ that satisfy all conditions, output No.
Otherwise, output $N$ and $A$ that satisfy all conditions in the following format:
Yes
N
A_1 A_2 \ldots A_N
If there are multiple $N$ and $A$ that satisfy the conditions, you may output any of them.
样例
3
6 5
3 2
8 3
Yes
3
3 1 4
No
Yes
2
0 1
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。