eolymp
bolt
Try our new interface for solving problems
Problems

Bobby Tables

Bobby Tables

Little Bobby Tables stores his favourite big numbers in his database. Those numbers take a lot of memory, so he is trying to figure out a way to store them more efficiently. He noticed that in the database there is a number X which has no large prime factors, and he suspects that it is of the form Ck_n, for some relatively small numbers n, k.

Help Bobby and check if it is really the case. Given an integer m and the prime factorization of X, determine whether there exist integers n, k such that 0knm and X = Ck_n.

A binomial coefficient Ck_n is a number prb4008-01

Input

The first line contains the number of test cases z (1z10 000). The descriptions of the test cases follow.

The first line of every test case contains two integers t, m (1t, m150 000), the number of primes in the factorization of X and the upper bound for output values, respectively. The second line contains t primes pi (2pim), such that product of all pi is X.

The sum of the numbers t in all the test cases does not exceed 200 000. The sum of the numbers m in all the test cases does not exceed 2 000 000.

Output

For each test case, if there exist appropriate n and k, output "YES" in the first line, and the values of n and k in the second line. Otherwise output only one line containing "NO".

Time limit 1 second
Memory limit 128 MiB
Input example #1
2
2 5
3 2
3 7
2 2 2
Output example #1
YES
4 2
NO
Source 2018 Petrozavodsk, Winter, Jagiellonian U, January 30, Problem J