CF1916A.2023

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

2023

In a sequence aa, whose product was equal to 20232023, kk numbers were removed, leaving a sequence bb of length nn. Given the resulting sequence bb, find any suitable sequence aa and output which kk elements were removed from it, or state that such a sequence could not have existed.

Notice that you are not guaranteed that such array exists.

Input

Each test consists of several test cases. The first line contains a single integer tt (1t1001 \le t \le 100) — the number of test cases. This is followed by a description of the test cases.

The first line of each test case contains two integers nn (1n,k51 \le n, k \le 5) — the size of sequence bb and the number of numbers removed from sequence aa.

The second line contains nn integers b1,b2,,bnb_1,b_2, \ldots,b_n (1bi20231 \leq b_i \leq 2023) — the remaining sequence. The values of bib_i might not be divisors of 20232023.

Output

For each test case, output "YES" if the sequence aa exists, and in the following line output kk non-negative integers that were removed from the sequence aa. If the sequence aa does not exist, output "NO" in a single line.

You can output the answer in any case (uppercase or lowercase). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive answers.

Note

In third test case product is equal to 2897=2023289 \cdot 7 = 2023.

In fourth test case product is already equal to 20232023.

In seventh test case product is equal to 71717=20237 \cdot 17 \cdot 17 = 2023.

Samples

7
2 2
5 2
3 1
7 17 7
4 2
1 289 1 1
3 1
7 17 17
1 1
289
1 1
2023
1 3
1
NO
NO
YES
7 1
YES
1
YES
7
YES
1
YES
7 17 17

在线编程 IDE

建议全屏模式获得最佳体验