题目描述
Read problems statements in Mandarin chinese, Russian and Vietnamese as well.
You are given a sequence $A_{1}, A_{2}, \dots, A_{N}$ of positive integers and an integer $K$. You are allowed to perform the following operation any number of times (including zero):
choose an index $j$ between $1$ and $N$ inclusive
choose a positive divisor $d$ of $A_{j}$ such that $d ≤ K$
divide $A_{j}$ by $d$
Determine if it is possible to modify the sequence $A$ in such a way that it would satisfy the following condition: there is no positive integer strictly greater than $1$ which divides every element of $A$. (In other words, the greatest common divisor of all elements of $A$ should be $1$.)
------ Input ------
The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
The first line of each test case contains two space-separated integers $N$ and $K$.
The second line contains $N$ space-separated integers $A_{1}, A_{2}, \dots, A_{N}$.
------ Output ------
For each test case, print a single line containing the string "YES" if it is possible to make the GCD of all elements of $A$ equal to $1$ or "NO" if it is impossible.
------ Constraints ------
$1 ≤ T ≤ 10$
$1 ≤ N ≤ 10^{5}$
$1 ≤ A_{i} ≤ 10^{9}$ for each valid $i$
$1 ≤ K ≤ 10^{9}$
------ Subtasks ------
Subtask #1 (30 points):
$1 ≤ N, K ≤ 100$
$1 ≤ A_{i} ≤ 100$ for each valid $i$
Subtask #2 (70 points): original constraints
----- Sample Input 1 ------
2
3 6
10 15 30
3 4
5 10 20
----- Sample Output 1 ------
YES
NO
输入格式
见题面
输出格式
见题面