#include <bits/stdc++.h>
using namespace std;
int n, a[110], whe[110], p, tot = 0, top, f[32][32][50050];
bitset<50500> vis[32][32], fs[32][32];
void dfs(int nowi, int nowj, int nowk) {
  if (!nowi) {
    printf("%d\n", tot);
    return;
  }
  if (fs[nowi][nowj][nowk]) tot++;
  dfs(nowi - 1, fs[nowi][nowj][nowk] ? nowj ^ a[nowi] : nowj,
      f[nowi][nowj][nowk]);
  if (fs[nowi][nowj][nowk]) printf("%d ", whe[nowi]);
}
int main() {
  cin >> n >> p;
  int x = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (x <= 31) a[++top] = x, whe[top] = i;
  }
  vis[0][0][0] = 1;
  for (int i = 0; i < top; i++)
    for (int j = 0; j <= 31; j++)
      for (int k = 0; k < p; k++) {
        if (!vis[i][j][k]) continue;
        if (i != 0 || j != 0 || k != 0) {
          f[i + 1][j][k] = k;
          fs[i + 1][j][k] = 0;
          vis[i + 1][j][k] = 1;
        }
        int j2 = j ^ a[i + 1], k2 = k, v = a[i + 1];
        while (v) k2 = k2 * 10 % p, v /= 10;
        k2 = (k2 + a[i + 1]) % p;
        f[i + 1][j2][k2] = k;
        fs[i + 1][j2][k2] = 1;
        vis[i + 1][j2][k2] = 1;
      }
  if (!vis[top][0][0])
    printf("No");
  else {
    printf("Yes\n");
    dfs(top, 0, 0);
  }
}
