H. Juan vs. Man
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
I shall at each moment did beat thee in this game
— Juan, Juan to Man

Man is trying so hard to become the boss, so he is always trying to beat Juan in any game, this time he came up with the following game.

Man will give Juan two integers $$$n$$$ and $$$m$$$, for Juan to win he should create an array $$$a$$$ with the following constrains:

  • The length of the array is $$$n$$$.
  • For every element in the array $$$1 \leq a_i \leq m$$$ must hold.
  • There should be no subarray where the sum is divisible my $$$m$$$, in a more formal way there is no $$$i$$$ and $$$j$$$ $$$(1 \leq i \leq j \leq n)$$$ such that $$${\sum_{k = i}^j a_k} \equiv 0 \mod m$$$.

Again, Ahmad is really busy so you should help Juan create the array or tell him it's not possible.

Input

The first line is the number of test cases $$$t$$$ $$$(1 \leq t \leq 10^5)$$$.

The next $$$t$$$ lines each contains two integers $$$n$$$ $$$(1 \leq n \leq 10^5)$$$, and $$$m$$$ $$$(1 \leq m \leq 10^6)$$$.

It's guaranteed that the sum of $$$n$$$ over all test cases is not greater than $$$3\times10^5$$$.

Output

For each test case, if there is an answer print "YES" followed by the array on the next line, otherwise print "NO".

Examples
Input
3
3 5
3 4
3 6
Output
YES
4 3 4
YES
3 2 1
YES
1 2 5
Input
2
3 2
4 5
Output
NO
YES
4 4 3 1