#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = 1e9;
const int maxn = 4e5 + 5;
void read(long long &x) {
  char ch;
  bool flag = 0;
  for (ch = getchar(); !isdigit(ch) && ((flag |= (ch == '-')) || 1);
       ch = getchar())
    ;
  for (x = 0; isdigit(ch); x = (x << 1) + (x << 3) + ch - 48, ch = getchar())
    ;
  x *= 1 - 2 * flag;
}
char s[maxn];
int a1[maxn], a2[maxn];
int k;
int t1 = 0, t2 = 0;
bool ans = 1;
void dfs(int cnt, int s1, int s2, int fa) {
  if (cnt == k) {
    puts("YES");
    int k = 0, kk = 0;
    for (int i = 0; i < t1 + t2; i++) {
      if (i % 2 == 0)
        printf("%d ", a1[k++]);
      else
        printf("%d ", a2[kk++]);
    }
    ans = 0;
    return;
  }
  if (cnt % 2 == 0) {
    for (int i = 0; i < 10; i++) {
      if (s[i] == '1' && s1 + i + 1 > s2 && i != fa) {
        a1[t1] = i + 1;
        ++t1;
        dfs(cnt + 1, s1 + i + 1, s2, i);
        if (!ans) return;
        --t1;
      }
    }
  } else {
    for (int i = 0; i < 10; i++) {
      if (s[i] == '1' && s1 < s2 + i + 1 && i != fa) {
        a2[t2] = i + 1, ++t2;
        dfs(cnt + 1, s1, s2 + i + 1, i);
        if (!ans) return;
        --t2;
      }
    }
  }
}
int main() {
  cin >> s >> k;
  dfs(0, 0, 0, -1);
  if (ans) puts("NO");
  return 0;
}
