#include <bits/stdc++.h>
using namespace std;
string s;
int m, weight[12], ans[1005];
bool dfs(int pos, int diff) {
  if (pos > m) return 1;
  for (int i = diff + 1; i <= 10; ++i) {
    if (weight[i] && ans[pos - 1] != i) {
      ans[pos] = i;
      if (dfs(pos + 1, i - diff)) return 1;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> s >> m;
  for (int i = 0; i < int(s.size()); ++i) weight[i + 1] = (s[i] - '0');
  if (dfs(1, 0)) {
    printf("YES\n");
    for (int i = 1; i <= m; ++i) printf("%d ", ans[i]);
  } else
    printf("NO\n");
  return 0;
}
