|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||0||0||0||0.000%|
Gnome Paul is participating in the elimination round of Gnome Math Cup. Problem F is the following.
You are given n positive integers a1, a2, ..., an and a positive integer d. You have to find non-zero integers x1, x2, ..., xn such that a1·x1 + a2·x2 + ... + an·xn = d. Gnomes don't like big numbers, so ai and d don't exceed 106, and xi must be between -106 and 106, but not equal to 0.
Help Paul to find at least one required sequence x1, x2, ..., xn, or detect that there is no solution.
The first line of input contains t — the number of test cases. Tests follow.
The first line of each test contains two integers n and d (1 ≤ n ≤ 105, 1 ≤ d ≤ 106). The second line contains n integers ai (1 ≤ ai ≤ 106). The sum of values of n for all test cases doesn't exceed 105.
Print the answer for each test case. If the required sequence of xi exists, print "YES" as the first line of output. The second line must contain the sequence itself. If there is no such sequence, output "NO" as the only line of output for this test.
2 2 1 2 3 3 3 2 3 1000
YES 2 -1 YES 503 -1 -1