#include <bits/stdc++.h>
using namespace std;
string s;
int m;
int ans[1100];
int solve(int i, int diff, int last) {
  if ((i > 0 && diff <= 0) || diff > 10) {
    return 0;
  }
  if (i == m) {
    cout << "YES" << endl;
    for (int j = 0; j < m; j++) {
      cout << ans[j] << " ";
    }
    return 1;
  }
  for (int j = 0; j < s.size(); j++) {
    if (s[j] == '1' && j != last) {
      ans[i] = j + 1;
      if (solve(i + 1, j + 1 - diff, j)) {
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> s >> m;
  if (!solve(0, 0, 10)) {
    cout << "NO" << endl;
    return 0;
  }
}
