#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <string>
#include <iostream>
#include <list>
#include <cstdlib>
#include <bitset>
#define lowbit(x) (x&(-x))
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
using namespace std;
const int mod = 110;
struct node
{
int k, id, v;
bool operator < (const node& other)const
{
if (v != other.v)
return v < other.v;
if (k != other.k)
return k > other.k;
return id < other.id;
}
node() {}
node(int _k,int _id,int _v):k(_k),id(_id),v(_v) {}
} temp;
long long qmod(long long a, long long n)
{
long long ans = 1;
long long t = a;
while (n)
{
if (n & 1)
ans = ans * a % mod;
a = a * a % mod;
n >>= 1;
}
if (ans == 0)
return t;
return ans;
}
int main()
{
int T;
scanf("%d", &T);
while (T--)
{
int n, h, k;
int v;
priority_queue<node> q;
scanf("%d%d%d", &n, &h, &k);
if (h > k)
q.push(node(0, 0, h - k));
for (int i = 1; i <= n; ++i)
{
scanf("%d", &v);
q.push(node(1, i, v));
}
int t = 2;
int id = 0;
if (h > k)
{
while (1)
{
temp = q.top();
q.pop();
int d = qmod(k, t);
++t;
temp.v -= d;
if (temp.v <= 0)
{
id = temp.id;
break;
}
q.push(temp);
}
}
if (id != 0)
{
puts("No");
printf("%d\n", id);
}
else
{
stack<node> sta;
while (!q.empty())
{
temp = q.top();
q.pop();
sta.push(temp);
}
puts("Yes");
while (!sta.empty())
{
temp = sta.top();
sta.pop();
printf("%d%c", temp.v, " \n"[sta.empty()]);
}
}
}
// system("pause");
}