题目描述
You are given an array of integers $a_1, a_2, \ldots, a_n$ of length $n$ and an integer $k$.
Two players are playing a game. The first player chooses an index $1 \le i \le n$. Then the second player chooses a different index $1 \le j \le n, i \neq j$. The first player wins if $|a_i - a_j|$ is not divisible by $k$. Otherwise, the second player wins.
We play as the first player. Determine whether it is possible to win, and if so, which index $i$ should be chosen.
The absolute value of a number $x$ is denoted by $|x|$ and is equal to $x$ if $x \ge 0$, and $-x$ otherwise.
Input
Each test contains multiple test cases. The first line of input contains a single integer $t$ ($1 \le t \le 100$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains two integers $n$ and $k$ ($1 \le n \le 100$; $1 \le k \le 100$) — the length of the array and the number $k$.
The second line of each test case contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 100$) — the elements of the array $a$.
Output
For each test case, if it is impossible for the first player to win, print "NO" (without quotes).
Otherwise, print "YES" (without quotes) and on the next line the appropriate index $1 \le i \le n$. If there are multiple solutions, print any of them.
You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
样例输出
提示
In the first test case, the first player can choose $a_2 = 2$. Then:
- If the second player chooses $a_1 = 1$, the resulting difference is $|2 - 1| = 1$ which is not divisible by $k = 2$.
- If the second player chooses $a_3 = 3$, the resulting difference is $|2 - 3| = 1$ which is not divisible by $k = 2$.
In the second test case:
- If the first player chooses $a_1 = 1$ and then the second player chooses $a_4 = 5$, the resulting difference is $|1 - 5| = 4$ which is divisible by $k = 2$.
- If the first player chooses $a_2 = 2$ and then the second player chooses $a_3 = 4$, the resulting difference is $|2 - 4| = 2$ which is divisible by $k = 2$.
- If the first player chooses $a_3 = 4$ and then the second player chooses $a_2 = 2$, the resulting difference is $|4 - 2| = 2$ which is divisible by $k = 2$.
- If the first player chooses $a_4 = 5$ and then the second player chooses $a_1 = 1$, the resulting difference is $|5 - 1| = 4$ which is divisible by $k = 2$.