#include <bits/stdc++.h>
using namespace std;
int m;
vector<int> ans, w;
void solve(int l, int r, int last, int taken, bool side) {
  if (taken == m) {
    cout << "YES" << endl;
    for (auto i : ans) cout << i << " ";
    exit(0);
  }
  for (auto i : w) {
    if (!side) {
      if (i != last && l + i > r) {
        ans.push_back(i);
        solve(l + i, r, i, taken + 1, !side);
        ans.pop_back();
      }
    } else {
      if (i != last && r + i > l) {
        ans.push_back(i);
        solve(l, r + i, i, taken + 1, !side);
        ans.pop_back();
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s >> m;
  for (int i = 0; i < s.size(); i++)
    if (s[i] != '0') w.push_back(i + 1);
  if (w.size() < 2 && m > 1) return cout << "NO", 0;
  solve(0, 0, -1, 0, 0);
  cout << "NO" << endl;
  return 0;
}
