#include <bits/stdc++.h>
using namespace std;
struct node {
  int y, z;
};
int n, num;
int ans[1005];
char s[100];
node p[1005][11][11];
bool f[1005][11][11];
vector<int> q;
int main() {
  scanf("%s", s);
  q.clear();
  for (int i = 1; i <= 10; i++)
    if (s[i - 1] == '1') q.push_back(i);
  num = q.size();
  scanf("%d", &n);
  memset(f, 0, sizeof(f));
  f[0][0][0] = true;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= 10; j++)
      for (int k = 0; k <= 10; k++)
        if (f[i][j][k] == true) {
          for (int l = 0; l < num; l++)
            if (q[l] != k && q[l] > j) {
              f[i + 1][q[l] - j][q[l]] = true;
              p[i + 1][q[l] - j][q[l]].y = j;
              p[i + 1][q[l] - j][q[l]].z = k;
            }
        }
  bool h = false;
  for (int i = 0; i <= 10; i++)
    for (int j = 0; j <= 10; j++)
      if (f[n][i][j] == true) {
        h = true;
        int y = i, z = j, ty, tz;
        for (int k = n; k >= 1; k--) {
          ans[k] = z;
          ty = p[k][y][z].y;
          tz = p[k][y][z].z;
          y = ty;
          z = tz;
        }
        break;
      }
  if (h == false)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      if (i != 1) printf(" ");
      printf("%d", ans[i]);
    }
    printf("\n");
  }
  return 0;
}
