#include <bits/stdc++.h>
using namespace std;
char weight[11];
int ans[1005];
int m;
bool dfs(int n, int dif) {
  if (n > m) return 1;
  for (int i = dif + 1; i <= 10; i++) {
    if (ans[n - 1] != i && weight[i - 1] == '1') {
      ans[n] = i;
      if (dfs(n + 1, i - dif)) {
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  scanf("%s", weight);
  scanf("%d", &m);
  if (dfs(1, 0)) {
    cout << "YES" << endl;
    for (int i = 1; i < m; i++) {
      cout << ans[i] << " ";
    }
    cout << ans[m] << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
