#include <bits/stdc++.h>
using namespace std;
void mahakal() {}
long long n, m;
string second;
vector<long long> ans;
bool solve(long long digit, long long last, long long idx) {
  if (idx == m) {
    cout << "YES" << endl;
    for (long long i = 0; i < m; i++) cout << ans[i] << " ";
    return true;
  }
  for (long long i = digit + 1; i <= 10; i++) {
    if (second[i] == '1' && i != last) {
      ans.push_back(i);
      if (solve(i - digit, i, idx + 1)) return true;
      ans.pop_back();
    }
  }
  return false;
}
void solve() {
  cin >> second;
  second = " " + second;
  cin >> m;
  if (!solve(0, 0, 0)) cout << "NO" << endl;
}
int main() {
  mahakal(), ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  while (t--) solve();
  return 0;
}
