#include <bits/stdc++.h>
using namespace std;
vector<long long int> v;
long long int m;
long long int ans[1005];
bool solve(long long int i, long long int bal, long long int last) {
  if (i > 0 && bal <= 0 || bal > 10) return 0;
  if (i == m) {
    cout << "YES\n";
    for (long long int j = 0; j < m; j++) cout << ans[j] << " ";
    cout << "\n";
    return 1;
  }
  for (long long int j = 0; j < v.size(); j++) {
    if (v[j] - 1 != last) {
      ans[i] = v[j];
      if (solve(i + 1, v[j] - bal, v[j] - 1)) return 1;
    }
  }
  return 0;
}
int main() {
  string s;
  cin >> s;
  long long int n = s.length(), i, j;
  cin >> m;
  for (i = 0; i < n; i++) {
    if (s[i] == '1') v.push_back(i + 1);
  }
  long long int bal = 0, cur = 10;
  if (solve(0, bal, cur))
    ;
  else
    cout << "NO\n";
}
